Semicolon & Sons
X
About
Contact & Support
Code Diary
Episodes
Blog
Subscribe
Sign in
Semicolon & Sons
About
Screencasts
Code Diary
Blog
Contact & Support
Subscribe
Sign In
Exceptions Code Diary Entries
This is part of the Semicolon&Sons
Code Diary
- consisting of lessons learned on the job.
Always rescue exceptions when rendering
Append child exception information in wrapping exceptions
Assume errors will happen at any point
Be concious of how exceptions will be read wrt newlines
Do not swallow exceptions
Ensure that exceptions in loops identify which element it was
Exceptions can consume all your RAM
First log exceptions before catching
Look at where at error occurred before classifying as unimportant
Name your exceptions and add enough data to debug it in the message
Prefer to do small bits of work twice without complaining over exceptions
Rescueing the most general exception is dangerous
Throw if an expected key is missing