htl-leo-itp-2325-4-5BHITM / cam-connect

Verleihsystem für das Equipment der HTL-Leonding
The Unlicense
2 stars 0 forks source link

Update error handeling #69

Open elYanuki opened 8 months ago

elYanuki commented 8 months ago

The main problem is that we sometimes catch for (Exception ex), this also includes a CCException.

when this generic catch surrounds another method such as a getById or anything else that can throw a CCException: we essentially loose that information that the id was wrong and just throw the less detailed exception thats listed in the catch clause.

elYanuki commented 5 months ago

this is not fully complete, classes such as in the devicetypeRepository still have dangerous generic catches (ones that contain antother function that can throw a CCException) But in the name of clean code: almost every catch should be a specific exception