Skip to main content
  1. Posts/

Exceptions Deserve to be Handled

·65 words·1 min
Author
Michael Kent
Software engineering leader writing on engineering practice, incident response, performance debugging, security, and shipping software.

Some code smell I came upon today! Exceptions should always be handled in some way, even if just logging it and continuing on(the next person troubleshooting a problem will thank you). Also, exceptions should be exceptional – they are slow and break up code flow; avoid using them for normal circumstances, like bad user input.

try
{
   //do something
}
catch (Exception e) { }