Phoenix
Object-oriented orthogonally persistent operating system
|
Definition of the class used as return value to indicate successful or failed call. More...
Go to the source code of this file.
Classes | |
class | RetCode |
Class used as return value to indicate successful or failed call. More... | |
Defines | |
#define | RC(__code) |
Macro for constructing return code object. | |
#define | OK(__rc) |
Check if the return code is successful. | |
#define | NOK(__rc) |
Check if the return code indicates failure. |
Definition of the class used as return value to indicate successful or failed call.
#define NOK | ( | __rc | ) |
#define OK | ( | __rc | ) |
#define RC | ( | __code | ) |
({ \ if (RetCode::__code != RetCode::SUCCESS) { \ TRACE("Function '%s' at %s:%d failed: %s", \ __func__, __FILE__, __LINE__, __STR(__code)); \ } \ RetCode::__code; \ })
Macro for constructing return code object.
This should be used instead of of direct calls to RetCode class constructor in order to have additional troubleshooting functionality in debug builds.
__code | Return code - unqualified name of RetCode::Code enum member. |