LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Toggle main menu visibility
Loading...
Searching...
No Matches
error.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2012-2026, QORE Lab, Imperial College London
3
* All rights reserved.
4
*/
5
#ifndef LINE_UTIL_ERROR_H
6
#define LINE_UTIL_ERROR_H
7
8
/**
9
* @file
10
* @ingroup line_util
11
* The exception types the port throws.
12
*
13
* `Error` and its three refinements -- `InputError` for a malformed model or
14
* argument, `NumericError` for a computation that cannot produce an answer, and
15
* `UnsupportedError` for a feature the chosen algorithm does not cover. Nothing
16
* in the library calls `exit()` or writes to stderr on failure: the CLI catches
17
* these at `main` and the bindings map them to exceptions, so the same code path
18
* serves both.
19
*/
20
21
#include <stdexcept>
22
#include <string>
23
24
namespace
line
{
25
26
/**
27
* Base error for the multiprecision C++ port. Nothing in the library calls
28
* exit() or prints to stderr on failure: the CLI catches these at main and the
29
* Python binding maps them to exceptions, so the same code path serves both.
30
*/
31
class
Error
:
public
std::runtime_error {
32
public
:
33
explicit
Error
(
const
std::string& what) : std::runtime_error(what) {}
34
};
35
36
/** Malformed or inconsistent input (dimensions, negative populations, ...). */
37
class
InputError
:
public
Error
{
38
public
:
39
explicit
InputError
(
const
std::string& what) :
Error
(what) {}
40
};
41
42
/** The algorithm cannot proceed on this instance (singular matrix, ...). */
43
class
NumericError
:
public
Error
{
44
public
:
45
explicit
NumericError
(
const
std::string& what) :
Error
(what) {}
46
};
47
48
/** Requested feature or arithmetic mode is not ported yet. */
49
class
UnsupportedError
:
public
Error
{
50
public
:
51
explicit
UnsupportedError
(
const
std::string& what) :
Error
(what) {}
52
};
53
54
}
// namespace line
55
56
#endif
// LINE_UTIL_ERROR_H
line::Error::Error
Error(const std::string &what)
Definition
error.h:33
line::InputError::InputError
InputError(const std::string &what)
Definition
error.h:39
line::NumericError::NumericError
NumericError(const std::string &what)
Definition
error.h:45
line::UnsupportedError::UnsupportedError
UnsupportedError(const std::string &what)
Definition
error.h:51
line
Definition
aoi_dist2ph.h:52
include
line
util
error.h
Generated by
1.18.0