#include <stdexcept>
#include <fmt/format.h>
Go to the source code of this file.
- Copyright
- Copyright (C) 2022 LAAS-CNRS, INRIA
Definition in file exceptions.hpp.
◆ PROXSUITE_NLP_RUNTIME_ERROR
#define PROXSUITE_NLP_RUNTIME_ERROR |
( |
| msg | ) |
|
Value: throw ::proxsuite::nlp::RuntimeError( \
fmt::format("{}({}): {}", __FILE__, __LINE__, msg))
Definition at line 8 of file exceptions.hpp.
◆ PROXSUITE_NLP_DIM_CHECK
#define PROXSUITE_NLP_DIM_CHECK |
( |
| x, |
|
|
| nx ) |
Value: if (x.size() != nx) \
PROXSUITE_NLP_RUNTIME_ERROR(fmt::format( \
"Input size invalid (expected {:d}, got {:d})", nx, x.size()))
Definition at line 12 of file exceptions.hpp.
◆ PROXSUITE_NLP_RAISE_IF_NAN
#define PROXSUITE_NLP_RAISE_IF_NAN |
( |
| value | ) |
|
Value: if (::proxsuite::nlp::math::check_value(value)) \
PROXSUITE_NLP_RUNTIME_ERROR("Encountered NaN.\n")
Definition at line 17 of file exceptions.hpp.
◆ PROXSUITE_NLP_RAISE_IF_NAN_NAME
#define PROXSUITE_NLP_RAISE_IF_NAN_NAME |
( |
| value, |
|
|
| name ) |
Value: if (::proxsuite::nlp::math::check_value(value)) \
PROXSUITE_NLP_RUNTIME_ERROR( \
fmt::format("Encountered NaN for value {:s}.\n", name))
Definition at line 21 of file exceptions.hpp.