Systematic Error Handling in C++ (2012 - Andrei)

Error handling is about error in the inputs, not bug. - C++ and Beyond 2012

  • hardware work
  • program is correct
  • opposed to general reliability, but consider
    • network error
    • device error
    • data error

Hypothesis

  • bad error handling engenders errors
  • insufficient testing make improbable error scenario
  • legit error lead to corrupt programs

Expected

  • either T
  • or the reason T was not created

Dislocation + Nestng = Fail

  • scope_guard
    • encapsulate control flow
    • scope_guard composition
    • put action at top level
Written on September 21, 2019, Last update on September 21, 2019
c++ error-handling exception