12 #ifndef SPROCKIT_COMMON_ERRORS_H_INCLUDED 13 #define SPROCKIT_COMMON_ERRORS_H_INCLUDED 29 #define SPROCKIT_ASSERT(condition) \ 31 fprintf(stderr, "Assertion failed: line %d, file \"%s\"\n", \ 32 __LINE__, __FILE__); \ 37 #define spkt_throw_printf(exc, template_str, ...) \ 38 throw exc(::sprockit::printf(#exc ": " template_str "\n%s %d", ##__VA_ARGS__, __FILE__, __LINE__)) 40 #define spkt_abort_printf(template_str, ...) \ 41 std::cerr << ::sprockit::printf("error: " template_str "\n%s %d\n", ##__VA_ARGS__, __FILE__, __LINE__); \ 44 #define spkt_throw(exc, ...) \ 46 std::stringstream sstr; \ 47 ::sprockit::spkt_to_stream(sstr, __VA_ARGS__, "\n", __FILE__, ":", __LINE__); \ 48 throw exc(sstr.str()); \ A general error somewhere from a library.
os_error(const std::string &msg)
Something happened when allocating, deallocating, or mapping a memory region.
io_error(const std::string &msg)
not_ported_error(const std::string &msg)
virtual const char * what() const
Something happened when iterating over a collection.
range_error(const std::string &msg)
memory_error(const std::string &msg)
An error indicating something to do with the advancement of simulation time.
library_error(const std::string &msg)
const std::string message
File open, read, or write error.
Exception indicating that chosen path is not yet ported to new framework.
virtual ~iterator_error()
Error indicating something was null and shouldn't have been.
iterator_error(const std::string &msg)
null_error(const std::string &msg)
time_error(const std::string &msg)
An error having to do with an operating system.
value_error(const std::string &msg)
invalid_key_error(const std::string &msg)
virtual ~invalid_key_error()
virtual ~not_ported_error()
General errors, or base class for more specific errors.
A function was intentionally unimplemented because it doesn't make sense, or it is ongoing work...
spkt_error(const std::string &msg)
virtual ~unimplemented_error()
Key to a map was not in the map.
An index was out of range in a collection.
unimplemented_error(const std::string &msg)
Error indicating some internal value was unexpected.