Practices - Exceptions

Use exceptions for situations which are unrecoverable at runtime, but require a cleanup. Such situations are buffer over/underruns, null pointer dereferences etc.

Gross, unrecoverable invariant breaches should also be reported via an exception.

Due to performance reasons exceptions should be used sparingly in mission critical code.

Exception class names should have 'exception' suffix.

class omg_wtf_bbq_we_are_screwed_exception;

Notice: exception is not only a language construct, but also a design pattern.