DD4hep  1.28.0
Detector Description Toolkit for High Energy Physics
main.h
Go to the documentation of this file.
1 #ifndef UTILITYAPPS_SRC_MAIN_H
2 #define UTILITYAPPS_SRC_MAIN_H
3 
4 //==========================================================================
5 // AIDA Detector description implementation
6 //--------------------------------------------------------------------------
7 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
8 // All rights reserved.
9 //
10 // For the licensing terms see $DD4hepINSTALL/LICENSE.
11 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
12 //
13 // Author : M.Frank
14 //
15 //==========================================================================
16 #include <stdexcept>
17 #include <iostream>
18 
19 int main_wrapper(int argc, char** argv );
20 
22 int main(int argc, char** argv) {
23  try {
24  return main_wrapper(argc,argv);
25  }
26  catch(const std::exception& e) {
27  std::cout << "Got uncaught exception: " << e.what() << std::endl;
28  }
29  catch (...) {
30  std::cout << "Got UNKNOWN uncaught exception." << std::endl;
31  }
32  return EINVAL;
33 }
34 
35 #endif
main
int main(int argc, char **argv)
Mini wrapper to call main exception safe ....
Definition: main.h:22
dd4hep::exception
void exception(const std::string &src, const std::string &msg)
Definition: RootDictionary.h:69
main_wrapper
int main_wrapper(int argc, char **argv)
Definition: g4gdmlDisplay.cpp:61