26#define CURRENT_LOCATION \
27 ADOLCError::ADOLCError::makeSourceLocation(__FILE__, __func__, __LINE__)
46 constexpr std::string_view
file()
const {
return file_; }
47 constexpr std::string_view
func()
const {
return func_; }
67 :
std::runtime_error(makeMessage(message, info)), info_(info) {}
76 std::ostringstream oss;
77 oss << message <<
"\n[Source] " << info.
file() <<
":" << info.
func() <<
":"
239 return static_cast<std::underlying_type_t<T>
>(t);
#define ADOLC_API
Definition adolcexport.h:16
ADOLCError(std::string_view message, const source_location &info)
Constructs an ADOLCError with message and source location.
Definition adolcerror.h:66
static std::string makeMessage(std::string_view message, const source_location &info)
Definition adolcerror.h:74
static constexpr source_location makeSourceLocation(std::string_view file, std::string_view func, int line)
Definition adolcerror.h:70
const source_location & where() const noexcept
Access the captured source location.
Definition adolcerror.h:86
Definition adolcerror.h:29
void ADOLC_API printError()
ErrorType
Definition adolcerror.h:89
@ VALUE_TAPE_FOPEN_FAILED
@ CHECKPOINTING_NULLPOINTER_FUNCTION_DOUBLE
@ CHECKPOINTING_NULLPOINTER_FUNCTION
@ INTEGER_TAPE_FREAD_FAILED
@ TAPING_STORE_REALLOC_FAILED
@ EXT_DIFF_NULLPOINTER_ARGUMENT
@ REVERSE_TAYLOR_COUNTS_MISMATCH
@ BUFFER_NULLPOINTER_FUNCTION
@ TAPE_DOC_COUNTS_MISMATCH
@ DIRGRAD_NOT_ENOUGH_DIRS
@ INTEGER_TAPE_FOPEN_FAILED
@ TAPING_TBUFFER_ALLOCATION_FAILED
@ REVERSE_NO_TAYLOR_STACK
@ TAPING_NOT_ACTUALLY_TAPING
@ EXT_DIFF_NULLPOINTER_DIFFFUNC
@ REVERSE_COUNTS_MISMATCH
@ TAPING_READ_ERROR_IN_TAYLOR_CLOSE
@ DISABLE_MINMAX_USING_ABS
@ CHECKPOINTING_UNEXPECTED_REVOLVE_ACTION
@ TAPING_TAPE_STILL_IN_USE
@ TAPING_BUFFER_ALLOCATION_FAILED
@ EXT_DIFF_WRONG_TAPESTATS
@ ADVECTOR_NON_DECREASING
@ TAPING_TAYLOR_OPEN_FAILED
@ EXT_DIFF_WRONG_FUNCTION_INDEX
@ CHECKPOINTING_NULLPOINTER_ARGUMENT
@ VALUE_TAPE_FREAD_FAILED
@ EXT_DIFF_NULLPOINTER_STRUCT
@ MORE_STAT_SPACE_REQUIRED
@ CHECKPOINTING_REVOLVE_IRREGULAR_TERMINATED
@ CHECKPOINTING_CPINFOS_NULLPOINTER
@ ENABLE_MINMAX_USING_ABS
@ EXT_DIFF_NULLPOINTER_FUNCTION
@ CP_STORED_EXCEEDS_SNAPS
void ADOLC_API fail(ErrorType error, const source_location LocInfo, const FailInfo &failinfo=FailInfo())
constexpr auto to_underlying(T t) noexcept
Definition adolcerror.h:238
Additional typed fields used when formatting an ADOL-C failure.
Definition adolcerror.h:225
short info1
Definition adolcerror.h:226
int info4
Definition adolcerror.h:229
size_t info6
Definition adolcerror.h:231
int info3
Definition adolcerror.h:228
size_t info2
Definition adolcerror.h:227
size_t info5
Definition adolcerror.h:230
unsigned char info7
Definition adolcerror.h:232
Lightweight source-location record used by ADOL-C exceptions.
Definition adolcerror.h:36
int line_
Definition adolcerror.h:40
constexpr std::string_view file() const
Definition adolcerror.h:46
constexpr source_location(std::string_view file, std::string_view func, int line)
Definition adolcerror.h:42
constexpr std::string_view func() const
Definition adolcerror.h:47
std::string_view file_
Definition adolcerror.h:38
constexpr int line() const
Definition adolcerror.h:48
std::string_view func_
Definition adolcerror.h:39
Numeric limits for taped active scalars.
Definition adtb_types.h:1417