39#ifndef L4_CXX_NO_EXCEPTION_BACKTRACE
40# define L4_CXX_EXCEPTION_BACKTRACE 20
43#if defined(L4_CXX_EXCEPTION_BACKTRACE)
64#if defined(L4_CXX_EXCEPTION_BACKTRACE)
84 void const *
const *
pc_array() const noexcept {
return _pc_array; }
100 void const *
const *
pc_array() const noexcept {
return 0; }
126 virtual char const *
str() const noexcept = 0;
160 for (; i <
sizeof(_extra) && extra[i]; ++i)
161 _extra[i] = extra[i];
162 _extra[i <
sizeof(_extra) ? i :
sizeof(_extra) - 1] = 0;
165 char const *
str() const noexcept
override
166 {
return l4sys_errtostr(_errno); }
181 long err_no() const noexcept {
return _errno; }
223 char const *
str() const noexcept
override {
return "unknown error"; }
256 template<
typename T>
258 char const *
str() const noexcept
override {
return "invalid object"; }
303 o <<
"Exception: " << e.
str() <<
", backtrace ...\n";
314 o <<
"Exception: " << e.
str() <<
": ";
317 o <<
"backtrace ...\n";
int l4util_backtrace(void **pc_array, int max_len)
Fill backtrace structure.
L4::Cap related definitions.
Base class for all exceptions, thrown by the L4Re framework.
virtual char const * str() const noexcept=0
Return a human readable string for the exception.
Base_exception() noexcept
Create a base exception.
C++ interface for capabilities.
Error conditions during IPC.
Com_error(long err) noexcept
Create a Com_error for the given L4 IPC error code.
Exception for duplicate element insertions.
Exception for a failed lookup (element not found).
Back-trace support for exceptions.
void const *const * pc_array() const noexcept
Get the array containing the call trace.
Exception_tracer() noexcept
Create a back trace.
int frame_count() const noexcept
Get the number of entries that are valid in the call trace.
Indicates that an invalid object was invoked.
char const * str() const noexcept override
Return a human readable string for the exception.
Invalid_capability(Cap< void > const &o) noexcept
Create an Invalid_object exception for the Object o.
Cap< void > const & cap() const noexcept
Get the object that caused the error.
Exception signalling insufficient memory.
Out_of_memory(char const *extra="") noexcept
Create an out-of-memory exception.
~Out_of_memory() noexcept
Destruction.
Exception for an abstract runtime error.
long err_no() const noexcept
Get the error value for this runtime error.
char const * extra_str() const
Get the description text for this runtime error.
Runtime_error(long err_no, char const *extra=0) noexcept
Create a new Runtime_error.
char const * str() const noexcept override
Return a human readable string for the exception.
Exception for an unknown condition.
char const * str() const noexcept override
Return a human readable string for the exception.
unsigned long l4_addr_t
Address type.
@ L4_EEXIST
Already exists.
@ L4_ENOENT
No such entity.
#define L4_CXX_EXCEPTION_BACKTRACE
Number of instruction pointers in backtrace.
L4 low-level kernel interface.