Elements  5.10
A C++ base framework for the Euclid Software.
BackTraceExample.cpp
Go to the documentation of this file.
1 
21 #include <map> // for map
22 #include <string> // for string
23 #include <boost/program_options.hpp> // for program options from configuration file of command line arguments
24 #include <stdexcept> // for standard exceptions
25 
26 #include "ElementsExamples/crashingFunction.h" // for crashingFunction
27 
28 #include "ElementsKernel/ProgramHeaders.h" // for including all Program/related headers
29 #include "ElementsKernel/Unused.h" // for ELEMENTS_UNUSED
30 
31 using std::map;
32 using std::string;
33 using boost::program_options::variable_value;
34 
35 namespace Elements {
36 namespace Examples {
37 
38 auto log = Logging::getLogger("BackTraceExample");
39 
41  log.info() << "Entering Second Level Function";
43 }
44 
46  log.info() << "Entering First Level Function";
48 }
49 
50 class BackTraceExample: public Program {
51 
52 public:
53 
55 
57 
58  log.info() << "done with test program! ";
59 
60  return ExitCode::OK;
61 
62  }
63 
64 };
65 
66 } // namespace Examples
67 } // namespace Elements
68 
69 
ExitCode mainMethod(ELEMENTS_UNUSED map< string, variable_value > &args) override
ExitCode
Strongly typed exit numbers.
Definition: Exit.h:98
Macro to silence unused variables warnings from the compiler.
Everything is OK.
Abstract class for all Elements programs.
Definition: Program.h:51
STL class.
STL class.
#define MAIN_FOR(ELEMENTS_PROGRAM_NAME)
Definition: Main.h:117
ELEMENTS_API void crashingFunction()
#define ELEMENTS_UNUSED
Definition: Unused.h:39
static Logging getLogger(const std::string &name="")
Definition: Logging.cpp:63