Set a correct exception template !

As a developer, you'll face bugs in production.
To analyze what happened, you'll rely on logs and well-known stack traces.

But, in order to get stack traces in your logs, exceptions in your application should be handled correctly.

Sometimes, you just see no stack trace in your logs because of a block like this:
Loading ....
Obviously, if an exception happens, you won't have any clue in your logs.
This kind of code is often generated by your IDE.
So, take a few minutes and change your try/catch template to the following :
Loading ....
Now, if the same exception appears, it will be rethrown in an unchecked exception.
If your application is correctly configured, it will be caught somewhere and logged there.

Try to convince your colleagues to do the same !

Commentaires

Posts les plus consultés de ce blog

Calendrier google des jours fériés

Easily create your own Eclipse

Eclipse.ini file