Error Handling

This topic can be closely related to command cancellation because often when an error is encountered, a command must be cancelled.

However, sometimes the error can be "fixed", ignored, or managed in a different way.

Some idioms for elevating errors are:

  1. Throw and exception.
  2. Return an error code.
  3. Log the event.
  4. Count the error.
  5. Pass the error up the call stack using a specialized mechanism (see Boost

Outcome https://www.boost.org/doc/libs/1_76_0/libs/outcome/doc/html/index.html).

Introduction