Chris@16: // boost/detail/lightweight_main.hpp -------------------------------------------------// Chris@16: Chris@16: // Copyright Beman Dawes 2010 Chris@16: Chris@16: // Distributed under the Boost Software License, Version 1.0. Chris@16: // See http://www.boost.org/LICENSE_1_0.txt Chris@16: Chris@16: #include Chris@16: #include Chris@16: Chris@16: //--------------------------------------------------------------------------------------// Chris@16: // // Chris@16: // exception reporting main() that calls cpp_main() // Chris@16: // // Chris@16: //--------------------------------------------------------------------------------------// Chris@16: Chris@16: int cpp_main(int argc, char* argv[]); Chris@16: Chris@16: int main(int argc, char* argv[]) Chris@16: { Chris@16: try Chris@16: { Chris@16: return cpp_main(argc, argv); Chris@16: } Chris@16: Chris@16: catch (const std::exception& ex) Chris@16: { Chris@16: std::cout Chris@16: << "\nERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR\n" Chris@16: << "\n****************************** std::exception *****************************\n" Chris@16: << ex.what() Chris@16: << "\n***************************************************************************\n" Chris@16: << std::endl; Chris@16: } Chris@16: return 1; Chris@16: }