koinos / koinos-exception-cpp

An exception library used by Koinos C++ applications.
MIT License
0 stars 0 forks source link

Extend catch macros to cover expected cases #10

Closed mvandeberg closed 3 years ago

mvandeberg commented 3 years ago

Currently the catch macros only catch koinos::exception. Except that we work with the standard library and boost, and both and throw their own exceptions. The pattern we've ended using elsewhere is this:

catch( const koinos::exception& ) {}
catch( const std::exception& ) {}
catch( const boost::exception& ) {}
catch( ... ) {}

I propose we extend the catch macros to handle this pattern and increase their usefulness.