Biorbd
src
Utils
Error.cpp
1
#define BIORBD_API_EXPORTS
2
#include "Utils/Error.h"
3
4
void
biorbd::utils::Error::raise
(
5
const
biorbd::utils::String
&message)
6
{
7
throw
std::runtime_error(message);
8
}
9
10
void
biorbd::utils::Error::check
(
11
bool
cond,
12
const
biorbd::utils::String
& message){
13
if
(!cond){
14
throw
std::runtime_error(message);
15
}
16
17
}
18
19
void
biorbd::utils::Error::warning
(
20
bool
cond,
21
const
biorbd::utils::String
& message){
22
if
(!cond){
23
std::cout <<
"Warning: "
<< message << std::endl;
24
}
25
}
biorbd::utils::Error::raise
static void raise(const biorbd::utils::String &message)
Throw an error message.
Definition:
Error.cpp:4
biorbd::utils::Error::warning
static void warning(bool cond, const biorbd::utils::String &message)
Non-blocking assert that displays the error message if false.
Definition:
Error.cpp:19
biorbd::utils::String
Wrapper around the std::string class with augmented functionality.
Definition:
String.h:17
biorbd::utils::Error::check
static void check(bool cond, const biorbd::utils::String &message)
Assert that raises the error message if false.
Definition:
Error.cpp:10
Generated by
1.8.18