aboutsummaryrefslogtreecommitdiff
path: root/butl/utility
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-03-22 00:36:27 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-03-22 00:36:27 +0300
commit615d333787c1d8dc08df5e30c60ec20600a74b85 (patch)
treec1eccc15aa77b8d300f275d2aef169452a3db628 /butl/utility
parent5a2fba169fc1bc3587d7d9b351d5c46a74f8f7b8 (diff)
Implement throw_generic_error() and throw_system_error()
Diffstat (limited to 'butl/utility')
-rw-r--r--butl/utility7
1 files changed, 4 insertions, 3 deletions
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&