Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fehlerbehandlung und Fehlermeldungen vereinheitlichen #46

Open
stekhn opened this issue Oct 20, 2022 · 0 comments
Open

Fehlerbehandlung und Fehlermeldungen vereinheitlichen #46

stekhn opened this issue Oct 20, 2022 · 0 comments
Labels

Comments

@stekhn
Copy link
Member

stekhn commented Oct 20, 2022

Momentan werden Fehler in allen möglichen Formen behandelt. Beispiele:

  • console.log(e)
  • throw Error()
  • throw Error('unbekannte Altersgruppe "' + text + '"')
  • throw Error(unknown altersgruppe "${gruppe}")

Manchmal passiert das aus try ... catch-Blöcken heraus, manchmal als Endbedingung einer Schleife, manchmal als Switch-Anweisung. Es wurden sogar leere catch-Blöcke gesichtet, was nicht unbedingt optimal ist.

Es wäre schön, wenn man das ein bisschen vereinheitlich könnte. Die entscheidende Frage sollte sein: Wann und warum möchte ich einen Fehler werfen und wann möchte ich vielleicht nur ein Vorkommnis ins Log schreiben?

@stekhn stekhn added the MEDIUM label Oct 20, 2022
@stekhn stekhn added LOW and removed MEDIUM labels Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant