C++ Utilities  4.17.0
Useful C++ classes and routines such as argument parser, IO and conversion utilities
conversionexception.h
Go to the documentation of this file.
1 #ifndef CONVERSION_UTILITIES_CONVERSIONEXCEPTION_H
2 #define CONVERSION_UTILITIES_CONVERSIONEXCEPTION_H
3 
4 #include "../global.h"
5 
6 #include <stdexcept>
7 #include <string>
8 
9 namespace ConversionUtilities {
10 
11 class CPP_UTILITIES_EXPORT ConversionException : public std::runtime_error {
12 public:
14  ConversionException(const std::string &what) USE_NOTHROW;
15  ConversionException(const char *what) USE_NOTHROW;
17 };
18 
23 inline ConversionException::ConversionException(const char *what) USE_NOTHROW : std::runtime_error(what)
24 {
25 }
26 
27 } // namespace ConversionUtilities
28 
29 #endif // CONVERSION_UTILITIES_CONVERSIONEXCEPTION_H
#define CPP_UTILITIES_EXPORT
The ConversionException class is thrown by the various conversion functions of this library when a co...
#define USE_NOTHROW
Marks a function as never throwing, under no circumstances.
ConversionException() USE_NOTHROW
Constructs a new ConversionException.
Contains several functions providing conversions between different data types.