informatik-mannheim / HSMA-CTT

Open Source CoronaTrackingTool developed by the University of Applied Sciences Mannheim
GNU Affero General Public License v3.0
12 stars 2 forks source link

Please add logging to ErrorController #242

Open oliverhummel opened 3 years ago

oliverhummel commented 3 years ago

in de.hs_mannheim.informatik.ct.controller

Use @Slf4j and log.error... to add logging for each error that may occur, otherwise tracing errors from the log is impossible.

Especially the cause for the anyException should be logged: add Exception as a param to the method and log the exception, pls.

And at this occasion also remove the Sysout in line 125.

Made PR #243 for an example. (probably the other methods do not need a full stack trace).

oliverhummel commented 3 years ago

Since most methods here are copy and paste, the whole class could be shrunk to three methods when all exceptions inherited from one common super class such as CttException and use the same handling method then.