6 #include <system_error> 30 inline const char*
name()
const noexcept
override final;
45 return "Taskflow error";
50 static Error instance;
56 switch(
auto ec = static_cast<Error::Code>(code); ec) {
62 return "flow builder error";
66 return "executor error";
86 struct is_error_code_enum<tf::
Error::Code> : true_type {};
95 template <
typename... ArgsT>
96 void throw_se(
const char* fname,
const size_t line,
Error::Code c, ArgsT&&... args) {
98 oss <<
"[" << fname <<
":" << line <<
"] ";
105 #define TF_THROW(...) tf::throw_se(__FILE__, __LINE__, __VA_ARGS__);
Code
Error code definition.
Definition: error.hpp:21
Definition: taskflow.hpp:6
static const std::error_category & get()
acquires the singleton instance of the taskflow error category
Definition: error.hpp:49
const char * name() const noexcept override final
returns the name of the taskflow error category
Definition: error.hpp:44
std::string message(int) const override final
query the human-readable string of each error code
Definition: error.hpp:55
The error category of taskflow.
Definition: error.hpp:15