1 #include "../include/exception.hpp"
2 #include "../include/util.hpp"
23 std::ostream&
operator<<(std::ostream &lval,
const std::exception &rval)
27 lval << rval.what() <<
"\r\n";
48 lval << rval.
m_msg <<
"\r\n";
114 return new (std::nothrow)
exception(*
this);
148 u32 len = strlen(buf);
152 m_msg =
new (std::nothrow)
i8[len + 1];
exception(const i8 *,...)
Object constructor.
char i8
8-bit signed integer
std::ostream & operator<<(std::ostream &, const std::exception &)
Stream insertion operator for std::exception objects.
virtual exception * clone() const
Object virtual copy constructor.
#define likely(expr)
Offer a hint (positive) to the pipeline branch predictor.
static void lock()
Lock the global access mutex.
virtual const i8 * msg() const
Get the exception message.
static void unlock()
Unlock the global access mutex.
virtual ~exception()
Object destructor.
static i8 * va_format(const i8 *, va_list)
Format a buffer with a printf-style string expanded with the values of a variable argument list...
i8 * m_msg
Error description message.
unsigned int u32
32-bit unsigned integer
virtual exception & operator=(const exception &)
Assignment operator.
static void header(std::ostream &, const i8 *)
Print a tagged message header on an output stream.
This class is a throwable with a textual description of an error.
#define unlikely(expr)
Offer a hint (negative) to the pipeline branch predictor.
#define __D_ASSERT(x)
Assertion macro.