From 7b974a1b1ddc34e7f30a2d0787f5febf074dd414 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 11 Mar 2018 22:36:59 +0100 Subject: [PATCH] Add 'const char *' overload to ConversionException --- conversion/conversionexception.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/conversion/conversionexception.h b/conversion/conversionexception.h index 6b3770f..a56df68 100644 --- a/conversion/conversionexception.h +++ b/conversion/conversionexception.h @@ -12,8 +12,18 @@ class CPP_UTILITIES_EXPORT ConversionException : public std::runtime_error { public: ConversionException() USE_NOTHROW; ConversionException(const std::string &what) USE_NOTHROW; + ConversionException(const char *what) USE_NOTHROW; ~ConversionException() USE_NOTHROW; }; + +/*! + * \brief Constructs a new ConversionException. \a what is a C-style string + * describing the cause of the ConversionException. + */ +inline ConversionException::ConversionException(const char *what) USE_NOTHROW : std::runtime_error(what) +{ +} + } // namespace ConversionUtilities #endif // CONVERSION_UTILITIES_CONVERSIONEXCEPTION_H