Loading bricks/brick-except +5 −5 Original line number Diff line number Diff line Loading @@ -35,11 +35,11 @@ namespace brq { int _exit; error( int exit, const char *err ) error( int exit, const auto &err ) : std::runtime_error( err ), _exit( exit ) {} error( const char *err ) error( const auto &err ) : std::runtime_error( err ), _exit( 1 ) {} Loading @@ -66,7 +66,7 @@ namespace brq { if ( _moved_from || std::uncaught_exceptions() ) return; /* terminate if unwinding? */ auto args = std::tuple_cat( _args, std::make_tuple( _what.buffer() ) ); auto args = std::tuple_cat( _args, std::make_tuple( _what.str() ) ); std::apply( []( auto... a ) -> void { throw exc( a... ); }, args ); } Loading @@ -87,8 +87,8 @@ namespace brq struct system_error : std::system_error, stacked_error { system_error( const char *w ) : system_error( errno, w ) {} system_error( int e, const char *w ) : std::system_error( e, std::system_category(), w ) {} system_error( const auto &w ) : system_error( errno, w ) {} system_error( int e, const auto &w ) : std::system_error( e, std::system_category(), w ) {} const char *describe() const noexcept { return what(); } }; Loading Loading
bricks/brick-except +5 −5 Original line number Diff line number Diff line Loading @@ -35,11 +35,11 @@ namespace brq { int _exit; error( int exit, const char *err ) error( int exit, const auto &err ) : std::runtime_error( err ), _exit( exit ) {} error( const char *err ) error( const auto &err ) : std::runtime_error( err ), _exit( 1 ) {} Loading @@ -66,7 +66,7 @@ namespace brq { if ( _moved_from || std::uncaught_exceptions() ) return; /* terminate if unwinding? */ auto args = std::tuple_cat( _args, std::make_tuple( _what.buffer() ) ); auto args = std::tuple_cat( _args, std::make_tuple( _what.str() ) ); std::apply( []( auto... a ) -> void { throw exc( a... ); }, args ); } Loading @@ -87,8 +87,8 @@ namespace brq struct system_error : std::system_error, stacked_error { system_error( const char *w ) : system_error( errno, w ) {} system_error( int e, const char *w ) : std::system_error( e, std::system_category(), w ) {} system_error( const auto &w ) : system_error( errno, w ) {} system_error( int e, const auto &w ) : std::system_error( e, std::system_category(), w ) {} const char *describe() const noexcept { return what(); } }; Loading