CMS 3D CMS Logo

Macros | Functions
TestHelper.h File Reference

Go to the source code of this file.

Macros

#define RUNTEST()
 

Functions

int ptomaine (int argc, char *argv[], char **env)
 

Macro Definition Documentation

◆ RUNTEST

#define RUNTEST ( )
Value:
extern "C" char** environ; \
int main(int argc, char* argv[]) { return ptomaine(argc, argv, environ); }
int ptomaine(int argc, char *argv[], char **env)
Definition: TestHelper.cc:179

Definition at line 29 of file TestHelper.h.

Function Documentation

◆ ptomaine()

int ptomaine ( int  argc,
char *  argv[],
char **  env 
)

Definition at line 179 of file TestHelper.cc.

References dir2webdir::argc, cmsBatch::argv, EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, CMS_SA_ALLOW, do_work(), web.browse_db::env, cppFunctionSkipper::exception, and x.

179  {
180  int rc = 1;
181  // Standalone executable, prints exception message
182  CMS_SA_ALLOW try { rc = do_work(argc, argv, env); } catch (edm::Exception& x) {
183  std::cerr << "Caught an edm::Exception in " << argv[0] << '\n' << x;
184  } catch (cms::Exception& x) {
185  std::cerr << "Caught a cms::Exception in " << argv[0] << '\n' << x;
186  } catch (std::exception& x) {
187  std::cerr << "Caught a std::exception in " << argv[0] << '\n' << x.what();
188  } catch (...) {
189  std::cerr << "Caught an unknown exception in " << argv[0];
190  }
191  return rc;
192 }
#define CMS_SA_ALLOW
int do_work(int argc, char *argv[], char **env)
Definition: TestHelper.cc:56
float x