Elements 6.0.1
A C++ base framework for the Euclid Software.
Loading...
Searching...
No Matches
BackTraceExample.cpp
Go to the documentation of this file.
1
21#include <map> // for map
22#include <stdexcept> // for standard exceptions
23#include <string> // for string
24
25#include "ElementsExamples/crashingFunction.h" // for crashingFunction
26
27#include "ElementsKernel/ProgramHeaders.h" // for including all Program/related headers
28#include "ElementsKernel/Unused.h" // for ELEMENTS_UNUSED
29
30using std::map;
31using std::string;
32
33namespace Elements {
34namespace Examples {
35
36auto log = Logging::getLogger("BackTraceExample");
37
39 log.info() << "Entering Second Level Function";
41}
42
44 log.info() << "Entering First Level Function";
46}
47
48class BackTraceExample : public Program {
49
50public:
52
54
55 log.info() << "done with test program! ";
56
57 return ExitCode::OK;
58 }
59};
60
61} // namespace Examples
62} // namespace Elements
63
Macro to silence unused variables warnings from the compiler.
ExitCode mainMethod(ELEMENTS_UNUSED map< string, VariableValue > &args) override
static Logging getLogger(const std::string &name="")
Definition: Logging.cpp:63
Abstract class for all Elements programs.
Definition: Program.h:52
ExitCode
Strongly typed exit numbers.
Definition: Exit.h:97
#define MAIN_FOR(ELEMENTS_PROGRAM_NAME)
Definition: Main.h:113
#define ELEMENTS_UNUSED
Definition: Unused.h:39
@ OK
Everything is OK.
ELEMENTS_API void crashingFunction()