Coding by exception
Coding by exception is an accidental complexity in a software system in which the program handles specific errors that arise with unique exceptions. When an issue arises in a software system, an error is raised tracing the issue back to where it was caught and then where that problem came from, if applicable. Exceptions can be used to handle the error while the program is running and avoid crashing the system. Exceptions should be generalized and cover numerous errors that arise. Using these exceptions to handle specific errors that arise to continue the program is called coding by exception. This anti-pattern can quickly degrade software in performance and maintainability.
Background
As a general rule, well designed software projects contain very few corner cases.[1] There are a variety of software development methodologies that purport to help engineers develop software that avoid these corner cases. They typically address dependency management issues. Design patterns are another tool for arriving at less of a 'one-off' solution. As a simple solution, programmers should avoid writing code to specifically handle an error and instead use a more generalized solution. Exceptions were invented to keep a program running when simple errors are made and should not be improperly used.
Incorrect exception usage
Often coding by exception can lead to further issues in the software with incorrect exception usage. In addition to using exception handling for a unique problem, incorrect exception usage takes this further by executing code even after the exception is raised. This poor programming method resembles the goto method in many software languages but only occurs after a problem in the software is detected.