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