22#include <gtsam/config.h>
24#include <gtsam/dllexport.h>
31#include <tbb/tbb_allocator.h>
32#include <tbb/scalable_allocator.h>
39template<
class DERIVED>
44 typedef std::exception Base;
47 typedef std::basic_string<char, std::char_traits<char>,
48 tbb::tbb_allocator<char> > String;
49 typedef tbb::tbb_allocator<char> Allocator;
52 typedef std::string String;
53 typedef std::allocator<char> Allocator;
73 String(description.begin(), description.end())) {
81 const char* what() const noexcept
override {
106 InvalidArgumentThreadsafe> {
118 CholeskyFailed()
noexcept {}
119 ~CholeskyFailed()
noexcept override {}
Global functions in a separate testing namespace.
Definition chartTesting.h:28
Base exception type that uses tbb_allocator if GTSAM is compiled with TBB.
Definition ThreadsafeException.h:42
std::optional< String > description_
Optional description.
Definition ThreadsafeException.h:58
~ThreadsafeException() noexcept override
Default destructor doesn't have the noexcept.
Definition ThreadsafeException.h:77
bool dynamic_
Whether this object was moved.
Definition ThreadsafeException.h:57
ThreadsafeException()
Default constructor is protected - may only be created from derived classes.
Definition ThreadsafeException.h:61
ThreadsafeException(const ThreadsafeException &other)
Copy constructor is protected - may only be created from derived classes.
Definition ThreadsafeException.h:66
ThreadsafeException(const std::string &description)
Construct with description string.
Definition ThreadsafeException.h:71
RuntimeErrorThreadsafe(const std::string &description)
Construct with a string describing the exception.
Definition ThreadsafeException.h:90
OutOfRangeThreadsafe(const std::string &description)
Construct with a string describing the exception.
Definition ThreadsafeException.h:99
InvalidArgumentThreadsafe(const std::string &description)
Construct with a string describing the exception.
Definition ThreadsafeException.h:109