[fbf005] | 1 | //
|
---|
| 2 | // mpqc_main.cc
|
---|
| 3 | //
|
---|
| 4 | // Copyright (C) 1996 Limit Point Systems, Inc.
|
---|
| 5 | //
|
---|
| 6 | // Author: Edward Seidl <seidl@janed.com>
|
---|
| 7 | // Maintainer: LPS
|
---|
| 8 | //
|
---|
| 9 | // This file is part of MPQC.
|
---|
| 10 | //
|
---|
| 11 | // MPQC is free software; you can redistribute it and/or modify
|
---|
| 12 | // it under the terms of the GNU General Public License as published by
|
---|
| 13 | // the Free Software Foundation; either version 2, or (at your option)
|
---|
| 14 | // any later version.
|
---|
| 15 | //
|
---|
| 16 | // MPQC is distributed in the hope that it will be useful,
|
---|
| 17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 19 | // GNU General Public License for more details.
|
---|
| 20 | //
|
---|
| 21 | // You should have received a copy of the GNU General Public License
|
---|
| 22 | // along with the MPQC; see the file COPYING. If not, write to
|
---|
| 23 | // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
| 24 | //
|
---|
| 25 | // The U.S. Government is granted a limited license as per AL 91-7.
|
---|
| 26 | //
|
---|
| 27 | // \note This was extracted from \file mpqc.cc for refactoring into a library.
|
---|
| 28 |
|
---|
| 29 | #ifdef HAVE_CONFIG_H
|
---|
| 30 | #include <scconfig.h>
|
---|
| 31 | #endif
|
---|
| 32 |
|
---|
| 33 | #include <iostream>
|
---|
| 34 |
|
---|
| 35 | #include <util/class/scexception.h>
|
---|
| 36 |
|
---|
| 37 | #include "mpqc.h"
|
---|
| 38 |
|
---|
| 39 | using namespace std;
|
---|
| 40 |
|
---|
| 41 | using namespace sc;
|
---|
| 42 |
|
---|
| 43 | int
|
---|
| 44 | main(int argc, char *argv[])
|
---|
| 45 | {
|
---|
| 46 | size_t exitflag = 0;
|
---|
| 47 | try {
|
---|
| 48 | exitflag = detail::try_main(argc, argv);
|
---|
| 49 | }
|
---|
| 50 | catch (SCException &e) {
|
---|
| 51 | cout << argv[0] << ": ERROR: SC EXCEPTION RAISED:" << endl
|
---|
| 52 | << e.what()
|
---|
| 53 | << endl;
|
---|
| 54 | detail::clean_up();
|
---|
| 55 | throw;
|
---|
| 56 | }
|
---|
| 57 | catch (bad_alloc &e) {
|
---|
| 58 | cout << argv[0] << ": ERROR: MEMORY ALLOCATION FAILED:" << endl
|
---|
| 59 | << e.what()
|
---|
| 60 | << endl;
|
---|
| 61 | detail::clean_up();
|
---|
| 62 | throw;
|
---|
| 63 | }
|
---|
| 64 | catch (exception &e) {
|
---|
| 65 | cout << argv[0] << ": ERROR: EXCEPTION RAISED:" << endl
|
---|
| 66 | << e.what()
|
---|
| 67 | << endl;
|
---|
| 68 | detail::clean_up();
|
---|
| 69 | throw;
|
---|
| 70 | }
|
---|
| 71 | catch (...) {
|
---|
| 72 | cout << argv[0] << ": ERROR: UNKNOWN EXCEPTION RAISED" << endl;
|
---|
| 73 | detail::clean_up();
|
---|
| 74 | throw;
|
---|
| 75 | }
|
---|
| 76 |
|
---|
| 77 | return exitflag;
|
---|
| 78 | }
|
---|
| 79 |
|
---|
| 80 | /////////////////////////////////////////////////////////////////////////////
|
---|
| 81 |
|
---|
| 82 | // Local Variables:
|
---|
| 83 | // mode: c++
|
---|
| 84 | // c-file-style: "ETS"
|
---|
| 85 | // End:
|
---|