CppCommon 1.0.5.0
C++ Common Library
Loading...
Searching...
No Matches
fatal.h
Go to the documentation of this file.
1
9#ifndef CPPCOMMON_ERRORS_FATAL_H
10#define CPPCOMMON_ERRORS_FATAL_H
11
12#include "errors/system_error.h"
14#include "system/stack_trace.h"
15
16#include <string>
17
19
22#define fatality(...) CppCommon::fatal(__LOCATION__, __STACK__, __VA_ARGS__)
23
24namespace CppCommon {
25
27
39void fatal(const SourceLocation& location, const StackTrace& trace, const std::string& message, int error = SystemError::GetLast()) noexcept;
41
52void fatal(const SourceLocation& location, const StackTrace& trace, const std::exception& fatal) noexcept;
53
56} // namespace CppCommon
57
58#endif // CPPCOMMON_ERRORS_FATAL_H
static int GetLast() noexcept
Get the last system error code.
C++ Common project definitions.
void fatal(const SourceLocation &location, const StackTrace &trace, const std::string &message, int error=SystemError::GetLast()) noexcept
Fatal abort execution.
Definition fatal.cpp:16
Source location definition.
Stack trace snapshot provider definition.
System error definition.