Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:30:42

0001 //  boost/detail/lightweight_main.hpp  -------------------------------------------------//
0002 
0003 //  Copyright Beman Dawes 2010
0004 
0005 //  Distributed under the Boost Software License, Version 1.0.
0006 //  See http://www.boost.org/LICENSE_1_0.txt
0007 
0008 #include <iostream>
0009 #include <exception>
0010 
0011 //--------------------------------------------------------------------------------------//
0012 //                                                                                      //
0013 //                exception reporting main() that calls cpp_main()                      //
0014 //                                                                                      //
0015 //--------------------------------------------------------------------------------------//
0016 
0017 int cpp_main(int argc, char* argv[]);
0018 
0019 int main(int argc, char* argv[])
0020 {
0021   try
0022   {
0023     return cpp_main(argc, argv);
0024   }
0025 
0026   catch (const std::exception& ex)
0027   {
0028     std::cout
0029     << "\nERROR  ERROR  ERROR  ERROR  ERROR  ERROR  ERROR  ERROR  ERROR  ERROR  ERROR\n"
0030     << "\n****************************** std::exception *****************************\n"
0031     << ex.what()
0032     << "\n***************************************************************************\n"
0033     << std::endl;
0034   }
0035   return 1;
0036 }