annotate DEPENDENCIES/generic/include/boost/detail/lightweight_main.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents 2665513ce2d3
children
rev   line source
Chris@16 1 // boost/detail/lightweight_main.hpp -------------------------------------------------//
Chris@16 2
Chris@16 3 // Copyright Beman Dawes 2010
Chris@16 4
Chris@16 5 // Distributed under the Boost Software License, Version 1.0.
Chris@16 6 // See http://www.boost.org/LICENSE_1_0.txt
Chris@16 7
Chris@16 8 #include <iostream>
Chris@16 9 #include <exception>
Chris@16 10
Chris@16 11 //--------------------------------------------------------------------------------------//
Chris@16 12 // //
Chris@16 13 // exception reporting main() that calls cpp_main() //
Chris@16 14 // //
Chris@16 15 //--------------------------------------------------------------------------------------//
Chris@16 16
Chris@16 17 int cpp_main(int argc, char* argv[]);
Chris@16 18
Chris@16 19 int main(int argc, char* argv[])
Chris@16 20 {
Chris@16 21 try
Chris@16 22 {
Chris@16 23 return cpp_main(argc, argv);
Chris@16 24 }
Chris@16 25
Chris@16 26 catch (const std::exception& ex)
Chris@16 27 {
Chris@16 28 std::cout
Chris@16 29 << "\nERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR\n"
Chris@16 30 << "\n****************************** std::exception *****************************\n"
Chris@16 31 << ex.what()
Chris@16 32 << "\n***************************************************************************\n"
Chris@16 33 << std::endl;
Chris@16 34 }
Chris@16 35 return 1;
Chris@16 36 }