// // mpqc_main.cc // // Copyright (C) 1996 Limit Point Systems, Inc. // // Author: Edward Seidl // Maintainer: LPS // // This file is part of MPQC. // // MPQC is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2, or (at your option) // any later version. // // MPQC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with the MPQC; see the file COPYING. If not, write to // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. // // The U.S. Government is granted a limited license as per AL 91-7. // // \note This was extracted from \file mpqc.cc for refactoring into a library. #ifdef HAVE_CONFIG_H #include #endif #include #include #include "mpqc.h" using namespace std; using namespace sc; int main(int argc, char *argv[]) { size_t exitflag = 0; try { exitflag = detail::try_main(argc, argv); } catch (SCException &e) { cout << argv[0] << ": ERROR: SC EXCEPTION RAISED:" << endl << e.what() << endl; detail::clean_up(); throw; } catch (bad_alloc &e) { cout << argv[0] << ": ERROR: MEMORY ALLOCATION FAILED:" << endl << e.what() << endl; detail::clean_up(); throw; } catch (exception &e) { cout << argv[0] << ": ERROR: EXCEPTION RAISED:" << endl << e.what() << endl; detail::clean_up(); throw; } catch (...) { cout << argv[0] << ": ERROR: UNKNOWN EXCEPTION RAISED" << endl; detail::clean_up(); throw; } return exitflag; } ///////////////////////////////////////////////////////////////////////////// // Local Variables: // mode: c++ // c-file-style: "ETS" // End: