Releases: m2osw/libexcept
Release 1.1.7.1
Changes:
-
Added a demangle function
-
Made various clean ups
-
Added a flag to allow/disallow the capture of the stack trace. In some circumstances (especially in our Unit Tests) it's not useful and will slow down your process dramatically.
-
Made to
collect_stack_trace()functions global in the namespace. Useful to get such a trace from anywhere without having to generate an exception. -
Added the
out_of_range_texception. -
Added macros to ease the definition of exception and avoid the ultra repetitiveness over many lines in your headers. Now it's just one line:
For example:
// logic and out of range errors are not derived further DECLARE_LOGIC_ERROR(snapdatabase_logic_error);As we can see, for basic errors (logic/out_of_range), you just put one name. These errors are logic errors so they are not expected to be extended nor caught (this is something the programmer is expected to fix if it ever happens).
// your library specific errors are declared from a base class DECLARE_MAIN_EXCEPTION(my_project); DECLARE_EXCEPTION(my_project, never_enough_time);For errors within your project, you use the main exception and then declare any number of exception specific to your project. These are expected run-time errors that the programmer detects but can't just avoid. Something may need fixing (i.e. missing file that should have been installed by a package) but that's not directly a programmer error which is pure logic that failed in a specific case.
Release 1.0.5.0
First release. This has worked great for a while only we did not have a complete Debian environment yet. That is, the docs were missing. There were some references to another package too (things that had not be updated properly.)
This library depends on the snapcmakemodules package.