Skip to content

A C++ header that uses the RAII pattern to simplify catching and reporting errors for a sequence of steps, throwing all accumulated exception messages as a single exception when going out of scope.

License

Notifications You must be signed in to change notification settings

daleabarnard/try-catcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TryCatcher

TryCatcher provides a modern C++ RAII mechanism to complete a sequence of operations, catch any and all exceptions that may occur, and throw a single, composite message when it goes out of scope.

In this way, all steps in the sequence will be tried regardless of any errors that may occur along the way. Any and all errors will be reported in a newline-separated message string when the TryCatcher goes out of scope and throws an exception. If no errors occur, TryCatcher goes out of scope without throwing an exception.

See the well-commented TryCatcher.h file for details and examples.

About

A C++ header that uses the RAII pattern to simplify catching and reporting errors for a sequence of steps, throwing all accumulated exception messages as a single exception when going out of scope.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages