From 3f2323dae243d7654d3319fe7f53b87062b0d62e Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 17 Feb 2017 09:27:02 +0000 Subject: Fix cpfile() to throw system_error only --- butl/fdstream.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'butl/fdstream.cxx') diff --git a/butl/fdstream.cxx b/butl/fdstream.cxx index e28eb0f..bdbfa08 100644 --- a/butl/fdstream.cxx +++ b/butl/fdstream.cxx @@ -39,8 +39,8 @@ namespace butl // throw_ios_failure // template - static inline void - throw_ios_failure (error_code e, typename enable_if::type m) + static inline typename enable_if::type + throw_ios_failure (error_code e, const char* m) { // The idea here is to make an error code to be saved into failure // exception and to make a string returned by what() to contain the error @@ -57,9 +57,8 @@ namespace butl } template - static inline void - throw_ios_failure (error_code e, - typename enable_if::type m) + static inline typename enable_if::type + throw_ios_failure (error_code e, const char* m) { throw ios_base::failure (m != nullptr ? m : e.message ().c_str ()); } -- cgit v1.1