CppCommon  1.0.4.1
C++ Common Library
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"
13 #include "system/source_location.h"
14 #include "system/stack_trace.h"
15 
16 #include <string>
17 
19 
22 #define fatality(...) CppCommon::fatal(__LOCATION__, __STACK__, __VA_ARGS__)
23 
24 namespace CppCommon {
25 
27 
39 void fatal(const SourceLocation& location, const StackTrace& trace, const std::string& message, int error = SystemError::GetLast()) noexcept;
41 
52 void 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.
Definition: token_bucket.h:15
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.