16#ifndef __LEGION_EXCEPTION_H__
17#define __LEGION_EXCEPTION_H__
29 LEGION_APPLICATION_EXCEPTION,
30 LEGION_INTERFACE_EXCEPTION,
31 LEGION_DYNAMIC_TYPE_EXCEPTION,
32 LEGION_PROGRAMMING_MODEL_EXCEPTION,
33 LEGION_MAPPER_EXCEPTION,
34 LEGION_RESOURCE_EXCEPTION,
35 LEGION_STARTUP_EXCEPTION,
36 LEGION_FATAL_EXCEPTION,
37 LEGION_WARNING_EXCEPTION,
61 void record_backtrace(
const Realm::Backtrace& backtrace);
63 size_t size(
void)
const;
64 const char* data(
void)
const;
66 inline operator std::string_view(
void)
const
68 return std::string_view(data(), size());
71 virtual int_type overflow(int_type c)
override;
73 const ExceptionType type;
75 static constexpr size_t STACK_SIZE = 128;
76 static_assert(
sizeof(char) ==
sizeof(uint8_t));
77 char stack_buffer[STACK_SIZE];
89 Error(ExceptionType type = LEGION_APPLICATION_EXCEPTION);
98 inline Error& operator<<(T&& value)
100 stream << std::forward<T>(value);
103 [[noreturn]]
void raise(
void);
127 inline Fatal& operator<<(T&& value)
129 stream << std::forward<T>(value);
132 [[noreturn]]
void raise(
void);
156 inline Warning& operator<<(T&& value)
158 stream << std::forward<T>(value);
180 virtual bool can_handle(ExceptionType type)
const {
return false; }
183 virtual bool handle_exception(
184 Exception& exception,
const std::string_view& provenance,
185 const Realm::Backtrace& backtrace)
Definition exception.h:87
Definition exception.h:175
Definition exception.h:50
Definition exception.h:116
Definition exception.h:145
Definition accessors.h:29