diff options
-rw-r--r-- | libbutl/path.cxx | 6 | ||||
-rw-r--r-- | libbutl/path.mxx | 9 |
2 files changed, 8 insertions, 7 deletions
diff --git a/libbutl/path.cxx b/libbutl/path.cxx index 47d691b..17b380a 100644 --- a/libbutl/path.cxx +++ b/libbutl/path.cxx @@ -70,10 +70,10 @@ using namespace butl::win32; namespace butl { - char const* invalid_path_base:: - what () const throw () + invalid_path_base:: + invalid_path_base () + : invalid_argument ("invalid filesystem path") { - return "invalid filesystem path"; } // diff --git a/libbutl/path.mxx b/libbutl/path.mxx index 2ad3c6a..35ba0ec 100644 --- a/libbutl/path.mxx +++ b/libbutl/path.mxx @@ -13,7 +13,7 @@ #include <cstddef> // ptrdiff_t #include <utility> // move(), swap() #include <iterator> -#include <exception> +#include <stdexcept> // invalid_argument #include <functional> // hash #include <vector> @@ -61,10 +61,11 @@ LIBBUTL_MODEXPORT namespace butl // non-dir-adapted implementation (see where we call K::cast()). // - struct LIBBUTL_SYMEXPORT invalid_path_base: public std::exception + // @@ This should probably be called invalid_path_argument + // + struct LIBBUTL_SYMEXPORT invalid_path_base: public std::invalid_argument { - virtual char const* - what () const throw (); + invalid_path_base (); }; template <typename C> |