SimGrid
3.18
Versatile Simulation of Distributed Systems
|
Exceptions support (C)
Those fonctions are used to throw C++ exceptions from C code. This feature should probably be removed in the future because C and exception do not exactly play nicely together.
Classes | |
struct | xbt_ex |
A legacy exception. More... | |
Macros | |
#define | THROW(c, v) |
Builds and throws an exception. More... | |
#define | THROWF(c, v, ...) |
Builds and throws an exception with a printf-like formatted message. More... | |
#define | THROW_IMPOSSIBLE THROWF(unknown_error, 0, "The Impossible Did Happen (yet again)") |
Throw an exception because someting impossible happened. More... | |
#define | THROW_UNIMPLEMENTED THROWF(unknown_error, 0, "Function %s unimplemented",__func__) |
Throw an exception because someting unimplemented stuff has been attempted. More... | |
#define | THROW_DEADCODE THROWF(unknown_error, 0, "Function %s was supposed to be DEADCODE, but it's not",__func__) |
Throw an exception because some dead code was reached. More... | |
#define | DIE_IMPOSSIBLE xbt_die("The Impossible Did Happen (yet again)") |
Die because something impossible happened. More... | |
Enumerations | |
enum | xbt_errcat_t { unknown_error = 0, arg_error, bound_error, mismatch_error, not_found_error, system_error, network_error, timeout_error, cancel_error, thread_error, host_error, tracing_error, io_error, vm_error } |
Categories of errors. More... | |
Functions | |
const char * | xbt_ex_catname (xbt_errcat_t cat) |
Get the name of a category. More... | |
#define THROW | ( | c, | |
v | |||
) |
Builds and throws an exception.
#define THROWF | ( | c, | |
v, | |||
... | |||
) |
Builds and throws an exception with a printf-like formatted message.
#define THROW_IMPOSSIBLE THROWF(unknown_error, 0, "The Impossible Did Happen (yet again)") |
Throw an exception because someting impossible happened.
#define THROW_UNIMPLEMENTED THROWF(unknown_error, 0, "Function %s unimplemented",__func__) |
Throw an exception because someting unimplemented stuff has been attempted.
#define THROW_DEADCODE THROWF(unknown_error, 0, "Function %s was supposed to be DEADCODE, but it's not",__func__) |
Throw an exception because some dead code was reached.
Die because something impossible happened.
enum xbt_errcat_t |
Categories of errors.
This very similar to std::error_catgory and should probably be replaced by this in the future.
const char* xbt_ex_catname | ( | xbt_errcat_t | cat | ) |
Get the name of a category.
Get the name of a category.