14 public std::runtime_error
16 using std::runtime_error::runtime_error;
22 public std::runtime_error
24 using std::runtime_error::runtime_error;
30 public std::runtime_error
32 using std::runtime_error::runtime_error;
38 public std::runtime_error
40 using std::runtime_error::runtime_error;
46 public std::runtime_error
48 using std::runtime_error::runtime_error;
54 public std::runtime_error
56 using std::runtime_error::runtime_error;
62 public std::runtime_error
64 using std::runtime_error::runtime_error;
70 public std::runtime_error
72 using std::runtime_error::runtime_error;
78 public std::runtime_error
80 using std::runtime_error::runtime_error;
87 public std::runtime_error
89 using std::runtime_error::runtime_error;
95 public std::runtime_error
97 using std::runtime_error::runtime_error;
103 public std::runtime_error
105 using std::runtime_error::runtime_error;
108#ifndef HART_STRINGIFY
110#define HART_STRINGIFY2(x) #x
115#if HART_DO_NOT_THROW_EXCEPTIONS
117#define HART_THROW_IMPL(ExceptionType, message) std::cout << #ExceptionType << " triggered: \"" << message << "\", file: " << __FILE__ << ", line: " << __LINE__ << std::endl
121#define HART_THROW(ExceptionType, message) do { HART_THROW_IMPL(ExceptionType, message); } while (0
)
125#define HART_THROW_OR_RETURN(ExceptionType, message, returnValue) { HART_THROW_IMPL (ExceptionType, message); return returnValue; }
129#define HART_THROW_OR_RETURN_VOID(ExceptionType, message) { HART_THROW_IMPL (ExceptionType, message); return; }
133#define HART_THROW_OR_CONTINUE(ExceptionType, message) { HART_THROW_IMPL (ExceptionType, message); continue; }
137#define HART_THROW_IMPL(ExceptionType, message) throw ExceptionType (std::string (message) + ", file: " __FILE__ ", line: " HART_LINE_STRING)
141#define HART_THROW(ExceptionType, message) do { HART_THROW_IMPL(ExceptionType, message); } while (0
)
145#define HART_THROW_OR_RETURN(ExceptionType, message, returnValue) HART_THROW (ExceptionType, message)
149#define HART_THROW_OR_RETURN_VOID(ExceptionType, message) HART_THROW (ExceptionType, message)
153#define HART_THROW_OR_CONTINUE(ExceptionType, message) HART_THROW (ExceptionType, message)
160#define hassertfalse HART_THROW (hart::HartAssertException, "hassertfalse failed")
164#define hassert(condition) if (! (condition)) { HART_THROW (hart::HartAssertException, std::string ("hassert failed:") + #condition); }
168#define HART_WARNING(message) std::cout << "Warning: " << message << ", file: " << __FILE__ << ", line: " << __LINE__ << std::endl
Thrown when a numbers of channels is mismatched.
Thrown when the test runner is misconfigured.
Thrown when hassert() or hassertfalse are triggered.
Thrown when some I/O operation fails.
Thrown when a container index is out of range.
Thrown when a nullptr could be handled gracefully.
Thrown when sample rate is mismatched.
Thrown when an unexpected container size is encountered.
Thrown when some unexpected state is encountered.
Thrown by test asserts like HART_ASSERT_TRUE() and AudioTestBuilder::assertFalse()
Thrown when some parameter has an unsupported value.
Thrown when an inappropriate value is encountered.
#define HART_THROW(ExceptionType, message)
Throws an exception if HART_DO_NOT_THROW_EXCEPTIONS is set, prints a message otherwise.
#define HART_STRINGIFY(x)
#define HART_STRINGIFY2(x)
#define HART_THROW_IMPL(ExceptionType, message)