delpi
0.0.1
DElta-complete LP solver
Toggle main menu visibility
Loading...
Searching...
No Matches
exception.h
1
7
#pragma once
8
9
#include <stdexcept>
10
#include <string>
11
12
namespace
delpi
{
13
15
class
DelpiException :
public
std::runtime_error {
16
public
:
17
explicit
DelpiException(
const
char
*
const
message) : std::runtime_error{message} {}
18
explicit
DelpiException(
const
std::string& message) : std::runtime_error{message} {}
19
};
20
22
class
DelpiNotImplementedException final :
public
DelpiException {
23
public
:
24
DelpiNotImplementedException() : DelpiException(
"Not yet implemented"
) {}
25
explicit
DelpiNotImplementedException(
const
char
*
const
message) : DelpiException{message} {}
26
explicit
DelpiNotImplementedException(
const
std::string& message) : DelpiException{message} {}
27
};
28
30
class
DelpiNotSupportedException final :
public
DelpiException {
31
public
:
32
DelpiNotSupportedException() : DelpiException(
"Not supported"
) {}
33
explicit
DelpiNotSupportedException(
const
char
*
const
message) : DelpiException{message} {}
34
explicit
DelpiNotSupportedException(
const
std::string& message) : DelpiException{message} {}
35
};
36
38
class
DelpiInvalidArgumentException final :
public
DelpiException,
private
std::invalid_argument {
39
public
:
40
DelpiInvalidArgumentException() : DelpiException(
"Invalid argument"
), std::invalid_argument{
""
} {}
41
explicit
DelpiInvalidArgumentException(
const
char
*
const
message)
42
: DelpiException{message}, std::invalid_argument{message} {}
43
explicit
DelpiInvalidArgumentException(
const
std::string& message)
44
: DelpiException{message}, std::invalid_argument{message} {}
45
};
46
48
class
DelpiAssertionException final :
public
DelpiException {
49
public
:
50
explicit
DelpiAssertionException(
const
char
*
const
message) : DelpiException{message} {}
51
explicit
DelpiAssertionException(
const
std::string& message) : DelpiException{message} {}
52
};
53
55
class
DelpiLpSolverException final :
public
DelpiException {
56
public
:
57
explicit
DelpiLpSolverException(
const
char
*
const
message) : DelpiException{message} {}
58
explicit
DelpiLpSolverException(
const
std::string& message) : DelpiException{message} {}
59
};
60
62
class
DelpiParserException final :
public
DelpiException {
63
public
:
64
explicit
DelpiParserException(
const
char
*
const
message) : DelpiException{message} {}
65
explicit
DelpiParserException(
const
std::string& message) : DelpiException{message} {}
66
};
67
69
class
DelpiOutOfRangeException final :
public
DelpiException,
private
std::out_of_range {
70
public
:
71
explicit
DelpiOutOfRangeException(
const
char
*
const
message) : DelpiException{message}, std::out_of_range{message} {}
72
explicit
DelpiOutOfRangeException(
const
std::string& message) : DelpiException{message}, std::out_of_range{message} {}
73
};
74
76
class
DelpiUnreachableException final :
public
DelpiException {
77
public
:
78
DelpiUnreachableException() : DelpiException(
"Unreachable code"
) {}
79
explicit
DelpiUnreachableException(
const
char
*
const
message) : DelpiException{message} {}
80
explicit
DelpiUnreachableException(
const
std::string& message) : DelpiException{message} {}
81
};
82
83
}
// namespace delpi
delpi
Global namespace for the delpi library.
delpi
util
exception.h
Generated by
1.17.0