CMS 3D CMS Logo

Defines | Functions

CMSSW_4_4_3_patch1/src/FWCore/Utilities/interface/TestHelper.h File Reference

Go to the source code of this file.

Defines

#define RUNTEST()   extern "C" char** environ; int main(int argc, char* argv[]) { return ptomaine(argc, argv, environ); }

Functions

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

Define Documentation

#define RUNTEST ( )    extern "C" char** environ; int main(int argc, char* argv[]) { return ptomaine(argc, argv, environ); }

Definition at line 30 of file TestHelper.h.


Function Documentation

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

Definition at line 147 of file TestHelper.cc.

References benchmark_cfg::cerr, do_work(), exception, and x.

                                                 {
  int rc = 1;
  try {
    rc = do_work(argc, argv, env);
  }
  catch(edm::Exception& x) {
    std::cerr << "Caught an edm::Exception in "
              << argv[0] << '\n'
              << x;
  }
  catch(cms::Exception& x) {
    std::cerr << "Caught a cms::Exception in "
              << argv[0] << '\n'
              << x;
    }
  catch(std::exception& x) {
    std::cerr << "Caught a std::exception in "
              << argv[0] << '\n'
              << x.what();
  }
  catch(...) {
    std::cerr << "Caught an unknown exception in "
              << argv[0];
  }
  return rc;
}