46 HandlingPattern
const&
57 const char* cmdName =
cStr(
id);
58 TRACE (proc_dbg,
"invoking %s...", cmdName);
59 static _Fmt err_pre (
"Error state detected, %s *NOT* invoked.");
60 static _Fmt err_post (
"Error state after %s invocation.");
61 static _Fmt err_fatal (
"Execution of %s raised unknown error.");
69 (this->*action) (command);
82 WARN (command,
"Invocation of %s failed: %s", cmdName, problem.
what());
83 TRACE (proc_dbg,
"Error flag was: %s", errID.c());
86 catch (std::exception& library_problem)
89 WARN (command,
"Invocation of %s failed: %s", cmdName, library_problem.what());
90 TRACE (proc_dbg,
"Error flag was: %s", errID.c());
96 ERROR (command,
"Invocation of %s failed with unknown exception; error flag is: %s", cmdName, errID.c());
110 : log_(problem.what())
117 ExecResult::isValid()
const CStr cStr(std::string const &rendered)
convenience shortcut: forced conversion to c-String via string.
ExecResult()
default: command executed successfully
virtual CStr what() const noexcept override
std::exception interface : yield a diagnostic message
Steam-Layer implementation namespace root.
A front-end for using printf-style formatting.
Derived specific exceptions within Lumiera's exception hierarchy.
Token or Atom with distinct identity.
Result (Status) of command execution.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
lumiera_err lumiera_error(void)
Get and clear current error state.
HandlingPattern const & getPatternInstance(HandlingPattern::ID id)
access the singleton instance for a given ID
Pre-defined command execution skeletons.
void maybeThrow(string description="")
Check the lumiera error state and throw a specific exception in case a non-cleared errorflag is detec...
Lumiera error handling (C++ interface).
Steam-Layer Command implementation.
static HandlingPattern const & get(ID id)
retrieve the pre-configured pattern
ExecResult invoke(CommandImpl &, string id, Action) const
Interface and Base definition for all Lumiera Exceptions.
A hard wired collection of predefined command handling patterns.