37 HandlingPattern
const&
48 const char* cmdName =
cStr(
id);
49 TRACE (proc_dbg,
"invoking %s...", cmdName);
50 static _Fmt err_pre (
"Error state detected, %s *NOT* invoked.");
51 static _Fmt err_post (
"Error state after %s invocation.");
52 static _Fmt err_fatal (
"Execution of %s raised unknown error.");
60 (this->*action) (command);
73 WARN (command,
"Invocation of %s failed: %s", cmdName, problem.
what());
74 TRACE (proc_dbg,
"Error flag was: %s", errID.c());
77 catch (std::exception& library_problem)
80 WARN (command,
"Invocation of %s failed: %s", cmdName, library_problem.what());
81 TRACE (proc_dbg,
"Error flag was: %s", errID.c());
87 ERROR (command,
"Invocation of %s failed with unknown exception; error flag is: %s", cmdName, errID.c());
101 : log_(problem.what())
108 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.