From 615d333787c1d8dc08df5e30c60ec20600a74b85 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 22 Mar 2017 00:36:27 +0300 Subject: Implement throw_generic_error() and throw_system_error() --- butl/utility | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'butl/utility') diff --git a/butl/utility b/butl/utility index 7dc4d73..673b715 100644 --- a/butl/utility +++ b/butl/utility @@ -30,10 +30,10 @@ namespace butl // // See also the exception sanitization below. // - [[noreturn]] void - throw_generic_error (int errno_code); + [[noreturn]] LIBBUTL_EXPORT void + throw_generic_error (int errno_code, const char* what = nullptr); - [[noreturn]] void + [[noreturn]] LIBBUTL_EXPORT void throw_system_error (int system_code, int fallback_errno_code = 0); // Convert ASCII character/string case. If there is no upper/lower case @@ -252,6 +252,7 @@ namespace std // // - stripping leading colons and spaces (see fdstream.cxx) // - stripping trailing newlines, periods, and spaces + // - stripping system error redundant suffix (see utility.cxx) // - lower-case the first letter if the beginning looks like a word // LIBBUTL_EXPORT ostream& -- cgit v1.1