16#ifndef __LEGION_EXCEPTION_H__
17#define __LEGION_EXCEPTION_H__
19#include "legion/api/types.h"
24 LEGION_APPLICATION_EXCEPTION,
25 LEGION_INTERFACE_EXCEPTION,
26 LEGION_DYNAMIC_TYPE_EXCEPTION,
27 LEGION_PROGRAMMING_MODEL_EXCEPTION,
28 LEGION_MAPPER_EXCEPTION,
29 LEGION_RESOURCE_EXCEPTION,
30 LEGION_STARTUP_EXCEPTION,
31 LEGION_FATAL_EXCEPTION,
32 LEGION_WARNING_EXCEPTION,
56 void record_backtrace(
const Realm::Backtrace& backtrace);
58 size_t size(
void)
const;
59 const char* data(
void)
const;
61 inline operator std::string_view(
void)
const
63 return std::string_view(data(), size());
66 virtual int_type overflow(int_type c)
override;
68 const ExceptionType type;
70 static constexpr size_t STACK_SIZE = 128;
71 static_assert(
sizeof(char) ==
sizeof(uint8_t));
72 char stack_buffer[STACK_SIZE];
84 Error(ExceptionType type = LEGION_APPLICATION_EXCEPTION);
93 inline Error& operator<<(T&& value)
95 stream << std::forward<T>(value);
98 [[noreturn]]
void raise(
void);
122 inline Fatal& operator<<(T&& value)
124 stream << std::forward<T>(value);
127 [[noreturn]]
void raise(
void);
151 inline Warning& operator<<(T&& value)
153 stream << std::forward<T>(value);
175 virtual bool can_handle(ExceptionType type)
const {
return false; }
178 virtual bool handle_exception(
179 Exception& exception,
const std::string_view& provenance,
180 const Realm::Backtrace& backtrace)
Definition exception.h:82
Definition exception.h:170
Definition exception.h:45
Definition exception.h:111
Definition exception.h:140