C++ Utilities 5.27.0
Useful C++ classes and routines such as argument parser, IO and conversion utilities
Loading...
Searching...
No Matches
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
9namespace CppUtilities {
10
11class CPP_UTILITIES_EXPORT ConversionException : public std::runtime_error {
12public:
13 ConversionException() noexcept;
14 ConversionException(const std::string &what) noexcept;
15 ConversionException(const char *what) noexcept;
16 ~ConversionException() override;
17};
18
29 : runtime_error("unable to convert")
30{
31}
32
37inline ConversionException::ConversionException(const std::string &what) noexcept
38 : runtime_error(what)
39{
40}
41
46inline ConversionException::ConversionException(const char *what) noexcept
47 : std::runtime_error(what)
48{
49}
50
51} // namespace CppUtilities
52
53#endif // CONVERSION_UTILITIES_CONVERSIONEXCEPTION_H
The ConversionException class is thrown by the various conversion functions of this library when a co...
ConversionException() noexcept
Constructs a new ConversionException.
#define CPP_UTILITIES_EXPORT
Marks the symbol to be exported by the c++utilities library.
Definition global.h:14
Contains all utilities provides by the c++utilities library.