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