![]() |
Bitcoin ABC
0.22.12
P2P Digital Currency
|
Go to the source code of this file.
Classes | |
class | NonFatalCheckError |
Macros | |
#define | CHECK_NONFATAL(condition) |
Throw a NonFatalCheckError when the condition evaluates to false. More... | |
#define | Assert(val) |
Identity function. More... | |
Functions | |
template<typename T > | |
T | get_pure_r_value (T &&val) |
Helper for Assert(). More... | |
#define Assert | ( | val | ) |
Identity function.
Abort if the value compares equal to zero
#define CHECK_NONFATAL | ( | condition | ) |
Throw a NonFatalCheckError when the condition evaluates to false.
This should only be used
For example in RPC code, where it is undesirable to crash the whole program, this can be generally used to replace asserts or recoverable logic errors. A NonFatalCheckError in RPC code is caught and passed as a string to the RPC caller, which can then report the issue to the developers.