20 #include <glog/logging.h>
32 LOG(ERROR) <<
"UninitializeGuard has found that " <<
typeid(*target_).name()
33 <<
"#uninitialize() was not called when it was destructed. This is a BUG!"
34 <<
" We must call uninitialize() before destructors!";
38 LOG(FATAL) <<
"FATAL: According to kAbortIfNotExplicitlyUninitialized policy,"
39 <<
" we abort the program" << std::endl;
51 std::cerr <<
"FATAL: UninitializeGuard encounters an error on uninitialize()."
52 <<
" Aborting as we can't propagate this error appropriately."
53 <<
" error=" << error << std::endl;
58 std::cerr <<
"WARN: UninitializeGuard encounters an error on uninitialize()."
59 <<
" We can't propagate this error appropriately. Not cool!"
60 <<
" error=" << error << std::endl;
68 std::cerr <<
"But, fortunately uninitialize() didn't return errors, phew"
Automatically calls if uninitialize() wasn't called when it gets out of scope, and just complains whe...
Automatically calls if uninitialize() wasn't called when it gets out of scope, and does nothing even ...
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
Brings error stacktrace information as return value of functions.
Terminates the entire program if uninitialize() wasn't called when it gets out of scope...
Automatically calls if uninitialize() wasn't called when it gets out of scope, and terminates the ent...
virtual ErrorStack uninitialize()=0
An idempotent method to release all resources of this object, if any.
std::string print_backtrace()
Prints out backtrace.
#define ASSERT_ND(x)
A warning-free wrapper macro of assert() that has no performance effect in release mode even when 'x'...
virtual bool is_initialized() const =0
Returns whether the object has been already initialized or not.
bool is_error() const
Returns if this return code is not kErrorCodeOk.