aligator
0.6.1
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
exceptions.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <stdexcept>
4
#include <fmt/color.h>
5
6
#define ALIGATOR_RUNTIME_ERROR(msg) \
7
throw aligator::RuntimeError( \
8
fmt::format("{}({}): {}", __FILE__, __LINE__, msg))
9
10
#define ALIGATOR_DOMAIN_ERROR(msg) \
11
throw std::domain_error(fmt::format("{}({}): {}", __FILE__, __LINE__, msg))
12
13
#define ALIGATOR_WARNING(loc, msg) \
14
fmt::print(fmt::fg(fmt::color::yellow), "[{}] {}: {}", loc, __FUNCTION__, \
15
msg);
16
17
namespace
aligator
{
18
19
class
RuntimeError
:
public
std::runtime_error {
20
public
:
21
explicit
RuntimeError
(
const
std::string &what =
""
)
22
: std::runtime_error(what) {}
23
};
24
25
}
// namespace aligator
aligator::RuntimeError
Definition
exceptions.hpp:19
aligator::RuntimeError::RuntimeError
RuntimeError(const std::string &what="")
Definition
exceptions.hpp:21
aligator
Main package namespace.
Definition
action-model-wrap.hpp:12
include
aligator
utils
exceptions.hpp
Generated by
1.10.0