proxsuite-nlp  0.10.0
A primal-dual augmented Lagrangian-type solver for nonlinear programming on manifolds.
Loading...
Searching...
No Matches
exceptions.hpp File Reference
#include <stdexcept>
#include <fmt/format.h>
Include dependency graph for exceptions.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  proxsuite::nlp::RuntimeError
 

Namespaces

namespace  proxsuite
 Main package namespace.
 
namespace  proxsuite::nlp
 

Macros

#define PROXSUITE_NLP_RUNTIME_ERROR(msg)
 
#define PROXSUITE_NLP_DIM_CHECK(x, nx)
 
#define PROXSUITE_NLP_RAISE_IF_NAN(value)
 
#define PROXSUITE_NLP_RAISE_IF_NAN_NAME(value, name)
 

Detailed Description

Definition in file exceptions.hpp.

Macro Definition Documentation

◆ 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:
PROXSUITE_NLP_RUNTIME_ERROR("Encountered NaN.\n")
bool check_value(const T &x)
Definition math.hpp:85

Definition at line 17 of file exceptions.hpp.

◆ PROXSUITE_NLP_RAISE_IF_NAN_NAME

#define PROXSUITE_NLP_RAISE_IF_NAN_NAME ( value,
name )
Value:
PROXSUITE_NLP_RUNTIME_ERROR( \
fmt::format("Encountered NaN for value {:s}.\n", name))

Definition at line 21 of file exceptions.hpp.