Elements  6.0.1
A C++ base framework for the Euclid Software.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 
30 using std::map;
31 using std::string;
32 
33 namespace Elements {
34 namespace Examples {
35 
36 auto log = Logging::getLogger("BackTraceExample");
37 
39  log.info() << "Entering Second Level Function";
41 }
42 
44  log.info() << "Entering First Level Function";
46 }
47 
48 class BackTraceExample : public Program {
49 
50 public:
52 
54 
55  log.info() << "done with test program! ";
56 
57  return ExitCode::OK;
58  }
59 };
60 
61 } // namespace Examples
62 } // namespace Elements
63 
ExitCode
Strongly typed exit numbers.
Definition: Exit.h:97
Macro to silence unused variables warnings from the compiler.
Everything is OK.
Abstract class for all Elements programs.
Definition: Program.h:52
STL class.
STL class.
#define MAIN_FOR(ELEMENTS_PROGRAM_NAME)
Definition: Main.h:113
ELEMENTS_API void crashingFunction()
ExitCode mainMethod(ELEMENTS_UNUSED map< string, VariableValue > &args) override
#define ELEMENTS_UNUSED
Definition: Unused.h:39
static Logging getLogger(const std::string &name="")
Definition: Logging.cpp:63