diff --git a/test/common/functions/test_function_l2norm.cc b/test/common/functions/test_function_l2norm.cc index 0133463e1bf8ef46750fc4814443bcd5e06c967e..a649ffdf3ca912071218243b1e777abe8e4ca5d6 100644 --- a/test/common/functions/test_function_l2norm.cc +++ b/test/common/functions/test_function_l2norm.cc @@ -17,7 +17,7 @@ #include <dumux/discretization/box/fvgridgeometry.hh> #include <dumux/io/grid/gridmanager_yasp.hh> -int main (int argc, char *argv[]) try +int main (int argc, char *argv[]) { // maybe initialize mpi Dune::MPIHelper::instance(argc, argv); @@ -112,10 +112,3 @@ int main (int argc, char *argv[]) try std::cout << "All tests passed!" << std::endl; return 0; } -// ////////////////////////////////// -// Error handler -// ///////////////////////////////// -catch (const Dune::Exception& e) { - std::cout << e << std::endl; - return 1; -} diff --git a/test/common/integrate/test_integratescalar.cc b/test/common/integrate/test_integratescalar.cc index 9841040ef4b9d6b10782b1f36d8dcd5458dee16f..acc5407e28bcab696e0bbaf9014ddf383815c4af 100644 --- a/test/common/integrate/test_integratescalar.cc +++ b/test/common/integrate/test_integratescalar.cc @@ -33,7 +33,7 @@ private: } // end namespace Dumux -int main(int argc, char* argv[]) try +int main(int argc, char* argv[]) { using namespace Dumux; @@ -83,8 +83,3 @@ int main(int argc, char* argv[]) try return 0; } -catch (const Dune::Exception& e) -{ - std::cout << e << std::endl; - return 1; -} diff --git a/test/common/math/test_math.cc b/test/common/math/test_math.cc index 934dc7f4ec08764be95f7251fdaf8b597f8fca41..2d57336ffc37ae1f54163e5f80a43e997a2fa050 100644 --- a/test/common/math/test_math.cc +++ b/test/common/math/test_math.cc @@ -55,7 +55,7 @@ void checkTableInterpolation(Scalar ip, Scalar expected, const Table& table, Sca } // end namespace Test -int main() try +int main() { //! Declare Vectors (FieldVector and DynamicVector) Dune::FieldVector<double, 3> v1({1.0, 2.0, 3.0}); @@ -215,7 +215,3 @@ int main() try } } -catch (Dune::Exception& e) { - std::cerr << e << std::endl; - return 1; -} diff --git a/test/common/parameters/test_loggingparametertree.cc b/test/common/parameters/test_loggingparametertree.cc index 65618da66a6ce8a30bbdb90a67a73fda4a88991e..46ea9ec2bf8d69e4a2ae088a2c50f9854510bff0 100644 --- a/test/common/parameters/test_loggingparametertree.cc +++ b/test/common/parameters/test_loggingparametertree.cc @@ -6,7 +6,7 @@ #include <dumux/common/parameters.hh> -int main (int argc, char *argv[]) try +int main (int argc, char *argv[]) { using namespace Dumux; @@ -71,22 +71,3 @@ int main (int argc, char *argv[]) try return 0; } -// ////////////////////////////////// -// Error handler -// ///////////////////////////////// -catch (const Dune::RangeError &e) { - std::cout << e << std::endl; - return 1; -} -catch (const Dune::Exception& e) { - std::cout << e << std::endl; - return 1; -} -catch (const std::exception& e) { - std::cout << e.what() << std::endl; - return 1; -} -catch (...) { - std::cout << "Unknown exception!" << std::endl; - return 1; -} diff --git a/test/common/propertysystem/test_propertysystem.cc b/test/common/propertysystem/test_propertysystem.cc index f97c7c7a22409d8d7dc56173d06948b3b830d0ba..1e17ac008b35bc8c3400ec7efaf509d65721c544 100644 --- a/test/common/propertysystem/test_propertysystem.cc +++ b/test/common/propertysystem/test_propertysystem.cc @@ -81,7 +81,7 @@ struct UseTpfaFlux<TypeTag, TTag::CCTpfaDisc> { static constexpr bool value = tr } // end namespace Dumux //! the main function -int main(int argc, char* argv[]) try +int main(int argc, char* argv[]) { using namespace Dumux; using namespace Properties; @@ -120,17 +120,4 @@ int main(int argc, char* argv[]) try std::cout << "All tests passed!" << std::endl; return 0; } - -// error handler -catch (const Dune::Exception& e) -{ - std::cerr << "Dune exception thrown: " << e << " --> Abort!" << std::endl; - return 1; -} - -catch (...) -{ - std::cerr << "Unknown exception thrown --> Abort!" << std::endl; - return 2; -} // find . -type f -not -path '*common/properties*' -not -path '*/sequential/*' -not -name 'test_propertysystem*.cc' -name '*.[ch][ch]' -exec sed -i 's/SET_BOOL_PROP[ ]*(\([^,]*\),[ ]*\([^,]*\),[ ]*\([^)]*\))/template<class TypeTag>\nstruct \2<TypeTag, TTag::\1> { static constexpr bool value = \3; }/g' {} \; diff --git a/test/common/test_partial.cc b/test/common/test_partial.cc index 177aa96515174644db927429d91422f0f035012b..ca33e3a6da6f51823514214533602bb136298771 100644 --- a/test/common/test_partial.cc +++ b/test/common/test_partial.cc @@ -71,7 +71,7 @@ void runTest() } // end namespace Dumux -int main(int argc, char* argv[]) try +int main(int argc, char* argv[]) { using namespace Dumux; @@ -80,13 +80,3 @@ int main(int argc, char* argv[]) try return 0; } -catch (const Dune::Exception& e) -{ - std::cout << e << std::endl; - return 1; -} -catch (...) -{ - std::cout << "Unknown exception thrown!" << std::endl; - return 1; -} diff --git a/test/common/timeloop/test_timeloop.cc b/test/common/timeloop/test_timeloop.cc index 76712a1987bfc76ae9fe5bf644e5edfaa69862c6..be9f5e923ae7ff0c573361f2c34b3efab57e8e0c 100644 --- a/test/common/timeloop/test_timeloop.cc +++ b/test/common/timeloop/test_timeloop.cc @@ -12,7 +12,7 @@ #include <dumux/common/timeloop.hh> -int main(int argc, char* argv[]) try +int main(int argc, char* argv[]) { const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv); @@ -199,10 +199,3 @@ int main(int argc, char* argv[]) try return 0; } -// ////////////////////////////////// -// Error handler -// ///////////////////////////////// -catch (const Dune::Exception& e) { - std::cout << e << std::endl; - return 1; -} diff --git a/test/discretization/box/test_boxfvgeometry.cc b/test/discretization/box/test_boxfvgeometry.cc index 6e6688f9e4013e02d765581f8e6c2c447266c4c0..bc9b3d1318460a7c52ee2c96e6959957eed86628 100644 --- a/test/discretization/box/test_boxfvgeometry.cc +++ b/test/discretization/box/test_boxfvgeometry.cc @@ -46,7 +46,7 @@ public: } // end namespace Dumux #endif -int main (int argc, char *argv[]) try +int main (int argc, char *argv[]) { using namespace Dumux; @@ -115,11 +115,3 @@ int main (int argc, char *argv[]) try << " but the number of boundary scvfs is " << boundaryCount); } } -// ////////////////////////////////// -// Error handler -// ///////////////////////////////// -catch (Dune::Exception &e) { - - std::cout << e << std::endl; - return 1; -} diff --git a/test/discretization/cellcentered/tpfa/test_tpfafvgeometry.cc b/test/discretization/cellcentered/tpfa/test_tpfafvgeometry.cc index 856b3f6517cf3889d162c9e7fbf9274c53582947..1f7cf4955c81d5f4a675e99ed8f52ff26e11bd48 100644 --- a/test/discretization/cellcentered/tpfa/test_tpfafvgeometry.cc +++ b/test/discretization/cellcentered/tpfa/test_tpfafvgeometry.cc @@ -46,7 +46,7 @@ public: } // end namespace Dumux #endif -int main (int argc, char *argv[]) try +int main (int argc, char *argv[]) { using namespace Dumux; @@ -116,11 +116,3 @@ int main (int argc, char *argv[]) try << " but the number of boundary scvfs is " << boundaryCount); } } -// ////////////////////////////////// -// Error handler -// ///////////////////////////////// -catch (Dune::Exception &e) { - - std::cout << e << std::endl; - return 1; -} diff --git a/test/discretization/cellcentered/tpfa/test_tpfafvgeometry_nonconforming.cc b/test/discretization/cellcentered/tpfa/test_tpfafvgeometry_nonconforming.cc index ffbed2d4b53bf8f53fef3164a65c7ebce01e43de..36218567fb11e49b33366f069ee1f4dc0b5db5b7 100644 --- a/test/discretization/cellcentered/tpfa/test_tpfafvgeometry_nonconforming.cc +++ b/test/discretization/cellcentered/tpfa/test_tpfafvgeometry_nonconforming.cc @@ -106,7 +106,7 @@ std::string elementTypeName(const Dune::FieldVector<double, 2>& center) } // end namespace Dumux #endif -int main (int argc, char *argv[]) try +int main (int argc, char *argv[]) { using namespace Dumux; using namespace Dumux::Test; @@ -379,11 +379,3 @@ int main (int argc, char *argv[]) try DUNE_THROW(Dune::InvalidStateException, "Element center position could not be interpreted."); } } -// ////////////////////////////////// -// Error handler -// ///////////////////////////////// -catch (Dune::Exception& e) { - - std::cout << e << std::endl; - return 1; -} diff --git a/test/discretization/projection/test_projection_2d1d.cc b/test/discretization/projection/test_projection_2d1d.cc index a89d9f50df22d138fc7139e9f730afda60000a13..5f54a9b558ab2421994440c6a4bc45fb99416079 100644 --- a/test/discretization/projection/test_projection_2d1d.cc +++ b/test/discretization/projection/test_projection_2d1d.cc @@ -49,7 +49,7 @@ #include <dumux/discretization/projection/projector.hh> #include <dumux/multidomain/glue.hh> -int main (int argc, char *argv[]) try +int main (int argc, char *argv[]) { // maybe initialize mpi Dune::MPIHelper::instance(argc, argv); @@ -166,11 +166,3 @@ int main (int argc, char *argv[]) try return 0; } -// ////////////////////////////////// -// Error handler -// ///////////////////////////////// -catch (Dune::Exception &e) { - - std::cout << e << std::endl; - return 1; -} diff --git a/test/discretization/rotationsymmetry/test_rotationsymmetric_gridgeometry.cc b/test/discretization/rotationsymmetry/test_rotationsymmetric_gridgeometry.cc index 0e9b33e04dac7f45ae8582bdfb9abd5d0202cd4f..2f4ebe24c5d4a24ce49c7625986d8e43afd3eb2c 100644 --- a/test/discretization/rotationsymmetry/test_rotationsymmetric_gridgeometry.cc +++ b/test/discretization/rotationsymmetry/test_rotationsymmetric_gridgeometry.cc @@ -87,7 +87,7 @@ void runTest(const GG& gg, const double refVolume, const double refSurface) } // end namespace Dumux -int main (int argc, char *argv[]) try +int main (int argc, char *argv[]) { using namespace Dumux; @@ -211,11 +211,3 @@ int main (int argc, char *argv[]) try return 0; } -// ////////////////////////////////// -// Error handler -// ///////////////////////////////// -catch (Dune::Exception &e) { - - std::cout << e << std::endl; - return 1; -} diff --git a/test/discretization/staggered/test_staggered_free_flow_geometry.cc b/test/discretization/staggered/test_staggered_free_flow_geometry.cc index 5df69efaa56a621d7894cb7936d489cd016a88e6..cb050e0a983b6bed712a97796099c8fbe45df4db 100644 --- a/test/discretization/staggered/test_staggered_free_flow_geometry.cc +++ b/test/discretization/staggered/test_staggered_free_flow_geometry.cc @@ -56,7 +56,7 @@ public: } // end namespace Dumux #endif -int main (int argc, char *argv[]) try +int main (int argc, char *argv[]) { using namespace Dumux; @@ -191,11 +191,3 @@ int main (int argc, char *argv[]) try } } } -// ////////////////////////////////// -// Error handler -// ///////////////////////////////// -catch (Dune::Exception &e) { - - std::cout << e << std::endl; - return 1; -} diff --git a/test/discretization/staggered/test_staggeredfvgeometry.cc b/test/discretization/staggered/test_staggeredfvgeometry.cc index cfbb08cb42414c16e9a7cbc6ee8b6a4529c7677d..f25cf2dd70e744af76b19f3635608ac21b265268 100644 --- a/test/discretization/staggered/test_staggeredfvgeometry.cc +++ b/test/discretization/staggered/test_staggeredfvgeometry.cc @@ -92,7 +92,7 @@ struct TestFVGGTraits : public DefaultMapperTraits<GridView> } // end namespace Dumux #endif -int main (int argc, char *argv[]) try +int main (int argc, char *argv[]) { using namespace Dumux; @@ -166,11 +166,3 @@ int main (int argc, char *argv[]) try << " but the number of boundary scvfs is " << boundaryCount); } } -// ////////////////////////////////// -// Error handler -// ///////////////////////////////// -catch (Dune::Exception& e) { - - std::cout << e << std::endl; - return 1; -} diff --git a/test/flux/test_diffusioncontainers.cc b/test/flux/test_diffusioncontainers.cc index aef7046939369bfec215225ae081bb1ebe70e138..c0d1974d0dbe371f21b65815b43a633d8afa9ddd 100644 --- a/test/flux/test_diffusioncontainers.cc +++ b/test/flux/test_diffusioncontainers.cc @@ -126,7 +126,7 @@ using FickDC = Dumux::FickianDiffusionCoefficients<int, numComponents, numPhases template<int numComponents, int numPhases> using MSDC = Dumux::MaxwellStefanDiffusionCoefficients<int, numComponents, numPhases>; -int main(int argc, char* argv[]) try +int main(int argc, char* argv[]) { testFickianContainer<FickDC<1, 5>, 1, 5>(); testFickianContainer<FickDC<2, 2>, 2, 2>(); @@ -144,8 +144,3 @@ int main(int argc, char* argv[]) try return 0; } -catch (const Dune::Exception& e) -{ - std::cout << e << std::endl; - return 1; -} diff --git a/test/freeflow/navierstokes/angeli/main.cc b/test/freeflow/navierstokes/angeli/main.cc index 822f569c20abaa831fa9d18b8e3fbbfe6cdbf46e..8b8642b51d1fb5752552a7ee85cc683fe3c4765d 100644 --- a/test/freeflow/navierstokes/angeli/main.cc +++ b/test/freeflow/navierstokes/angeli/main.cc @@ -32,7 +32,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dumux/assembly/staggeredfvassembler.hh> @@ -103,7 +102,7 @@ auto createAnalyticalSolution(const Scalar time, const Problem& problem) return std::make_tuple(analyticalPressure, analyticalVelocity, analyticalVelocityOnFace); } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -249,27 +248,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/freeflow/navierstokes/channel/1d/main.cc b/test/freeflow/navierstokes/channel/1d/main.cc index 0e58e6aa0fe38cddffdc9ae0f98d260c23198c57..4954f69fc9147f6aea98c82e938a07ad57a51909 100644 --- a/test/freeflow/navierstokes/channel/1d/main.cc +++ b/test/freeflow/navierstokes/channel/1d/main.cc @@ -29,7 +29,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -45,7 +44,7 @@ #include "problem.hh" -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -142,27 +141,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/freeflow/navierstokes/channel/2d/main.cc b/test/freeflow/navierstokes/channel/2d/main.cc index e74e8bd06c7832d1108ab77f692d3b121ce383d5..240e7bc6d1ef6e74016fa7a09141c2099e6e46f7 100644 --- a/test/freeflow/navierstokes/channel/2d/main.cc +++ b/test/freeflow/navierstokes/channel/2d/main.cc @@ -29,7 +29,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -46,7 +45,7 @@ #include "problem.hh" -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -270,27 +269,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/freeflow/navierstokes/channel/3d/main.cc b/test/freeflow/navierstokes/channel/3d/main.cc index 3e77d0573fcfd3106ca8a34c8fc74b01455a1ce6..7e3b38a7d57a721c5eb16f1ac61c600716a1bbe1 100644 --- a/test/freeflow/navierstokes/channel/3d/main.cc +++ b/test/freeflow/navierstokes/channel/3d/main.cc @@ -29,7 +29,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -47,7 +46,7 @@ #include "problem.hh" -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -259,27 +258,3 @@ flux.addSurface("middle", p0middle, p1middle); return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/freeflow/navierstokes/channel/pipe/main.cc b/test/freeflow/navierstokes/channel/pipe/main.cc index 4f9691791a31279310161883e4e4f64e23219ae7..d8980e127014624ce58e85ccd069ec8d2a8eb96b 100644 --- a/test/freeflow/navierstokes/channel/pipe/main.cc +++ b/test/freeflow/navierstokes/channel/pipe/main.cc @@ -67,7 +67,7 @@ void printL2Error(const Problem& problem, const SolutionVector& x, const GridGeo logFile.close(); } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -137,22 +137,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (const Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (const Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (const Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} diff --git a/test/freeflow/navierstokes/closedsystem/main.cc b/test/freeflow/navierstokes/closedsystem/main.cc index b01f0652fe6c155557eac19312da96be31202f1e..f55d39fab726a6d867cbbfd72807d65bc87e0929 100644 --- a/test/freeflow/navierstokes/closedsystem/main.cc +++ b/test/freeflow/navierstokes/closedsystem/main.cc @@ -29,7 +29,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -45,7 +44,7 @@ #include "problem.hh" -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -162,27 +161,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/freeflow/navierstokes/donea/main.cc b/test/freeflow/navierstokes/donea/main.cc index 832f92e54034b88889feed4f69b03b0a001557a3..a42535a229a9768698ab7f369abba5a627fafd89 100644 --- a/test/freeflow/navierstokes/donea/main.cc +++ b/test/freeflow/navierstokes/donea/main.cc @@ -29,7 +29,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -46,7 +45,7 @@ #include "problem.hh" -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -148,27 +147,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/freeflow/navierstokes/kovasznay/main.cc b/test/freeflow/navierstokes/kovasznay/main.cc index 29ee863b0907cfd87b1a76909220474273b254d2..17ea7812d8f5ed2ff2b733890fd92384cda97a66 100644 --- a/test/freeflow/navierstokes/kovasznay/main.cc +++ b/test/freeflow/navierstokes/kovasznay/main.cc @@ -29,7 +29,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -47,7 +46,7 @@ #include "problem.hh" -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -173,27 +172,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/freeflow/navierstokes/sincos/main.cc b/test/freeflow/navierstokes/sincos/main.cc index 1dc57ec028333d028085272116e55a4f7db4e98d..eb202fd4b13d6b19428cc188909f0a3ec644b879 100644 --- a/test/freeflow/navierstokes/sincos/main.cc +++ b/test/freeflow/navierstokes/sincos/main.cc @@ -32,7 +32,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dumux/assembly/staggeredfvassembler.hh> @@ -167,7 +166,7 @@ void printL2Error(const Problem& problem, const SolutionVector& x, const GridGeo logFile.close(); } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -334,27 +333,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/freeflow/navierstokesnc/channel/main.cc b/test/freeflow/navierstokesnc/channel/main.cc index 4d568bbcf93be9615b432fe551378a03b1af8fe2..f2136767d4b6ab9be4ebad581ed7822afbcae49e 100644 --- a/test/freeflow/navierstokesnc/channel/main.cc +++ b/test/freeflow/navierstokesnc/channel/main.cc @@ -29,7 +29,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -45,7 +44,7 @@ #include "problem.hh" -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -166,27 +165,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/freeflow/navierstokesnc/densitydrivenflow/main.cc b/test/freeflow/navierstokesnc/densitydrivenflow/main.cc index a9f50c5ddd6e768ad72cf570829d0c3b832fddd0..7b35716685649a014a3793fbacbddc62b6e8fabd 100644 --- a/test/freeflow/navierstokesnc/densitydrivenflow/main.cc +++ b/test/freeflow/navierstokesnc/densitydrivenflow/main.cc @@ -29,7 +29,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -45,7 +44,7 @@ #include "problem.hh" -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -165,27 +164,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/freeflow/navierstokesnc/maxwellstefan/main.cc b/test/freeflow/navierstokesnc/maxwellstefan/main.cc index 34013d7609be4336738b1b715af30dc401aceda0..646c2719e62d0abbc79215fb87a15fdb0b7f1dd0 100644 --- a/test/freeflow/navierstokesnc/maxwellstefan/main.cc +++ b/test/freeflow/navierstokesnc/maxwellstefan/main.cc @@ -29,7 +29,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -45,7 +44,7 @@ #include "problem.hh" -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -167,27 +166,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/freeflow/rans/main.cc b/test/freeflow/rans/main.cc index 851716d130ab77be2791c0c24fe55002fe06f844..a9fefc3c8127f6acbc72484b38d91909a577a859 100644 --- a/test/freeflow/rans/main.cc +++ b/test/freeflow/rans/main.cc @@ -31,7 +31,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -69,7 +68,7 @@ void usage(const char *progName, const std::string &errorMsg) } } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -193,27 +192,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/freeflow/ransnc/main.cc b/test/freeflow/ransnc/main.cc index 805ad561c13419f8dac891eb6eef8d3ebec69c33..f880e7b7261fdc86445408f83eeaa0e82988aff7 100644 --- a/test/freeflow/ransnc/main.cc +++ b/test/freeflow/ransnc/main.cc @@ -29,7 +29,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -67,7 +66,7 @@ void usage(const char *progName, const std::string &errorMsg) } } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -225,27 +224,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/freeflow/shallowwater/bowl/main.cc b/test/freeflow/shallowwater/bowl/main.cc index 3099e69c6587a4b301d5c2a4f506f12eecd1656e..6f18181f5bc9c7beb006c9eb2ec496c5d83c3d86 100644 --- a/test/freeflow/shallowwater/bowl/main.cc +++ b/test/freeflow/shallowwater/bowl/main.cc @@ -28,7 +28,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dumux/io/vtkoutputmodule.hh> @@ -124,7 +123,7 @@ void computeAndPrintL2Error(const double t, //////////////////////// // the main function //////////////////////// -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -254,14 +253,3 @@ int main(int argc, char** argv) try return 0; } -// Error handling -catch (const Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (const Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 2; -} diff --git a/test/freeflow/shallowwater/dambreak/main.cc b/test/freeflow/shallowwater/dambreak/main.cc index 7471c8ab8972080851fdcd6415e87edf06d53b15..f272c0d497fc77e1c36e162355273ee45d0ac58e 100644 --- a/test/freeflow/shallowwater/dambreak/main.cc +++ b/test/freeflow/shallowwater/dambreak/main.cc @@ -30,7 +30,6 @@ #include <dune/common/version.hh> #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dumux/io/vtkoutputmodule.hh> #include <dune/istl/io.hh> @@ -58,7 +57,7 @@ //////////////////////// // the main function //////////////////////// -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -188,28 +187,3 @@ int main(int argc, char** argv) try return 0; } - -catch (const Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (const Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (const Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/freeflow/shallowwater/roughchannel/main.cc b/test/freeflow/shallowwater/roughchannel/main.cc index 235243d67ce5ed88b620d1677829630f0778627e..8e5a9b053835e0a59c782cd41095ee416604afb1 100644 --- a/test/freeflow/shallowwater/roughchannel/main.cc +++ b/test/freeflow/shallowwater/roughchannel/main.cc @@ -28,7 +28,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dumux/io/vtkoutputmodule.hh> @@ -48,7 +47,7 @@ //////////////////////// // the main function //////////////////////// -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -174,28 +173,3 @@ int main(int argc, char** argv) try return 0; } - -catch (const Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (const Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (const Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/geomechanics/elastic/main.cc b/test/geomechanics/elastic/main.cc index ca02fb46dc28cbbfc31bfc3f36985f5f7916802e..06f3b7c0c485271d793e2896444c73407ad7bb37 100644 --- a/test/geomechanics/elastic/main.cc +++ b/test/geomechanics/elastic/main.cc @@ -29,7 +29,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include "problem.hh" @@ -50,7 +49,7 @@ #include <dumux/io/grid/gridmanager.hh> // main function -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -147,27 +146,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException& e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException& e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception& e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/geomechanics/poroelastic/main.cc b/test/geomechanics/poroelastic/main.cc index 58a11b78e0b2a60536eb87073713f8e00ee9c4d0..b067c72b1528f697e25a43ecc3e85a3b952d08c7 100644 --- a/test/geomechanics/poroelastic/main.cc +++ b/test/geomechanics/poroelastic/main.cc @@ -30,7 +30,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> #include <dune/common/fvector.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include "problem.hh" @@ -93,7 +92,7 @@ void assembleElementStresses(SigmaStorage& sigmaStorage, } // main function -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -217,27 +216,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException& e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException& e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception& e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/geometry/boundingboxtree/test_bboxtree.cc b/test/geometry/boundingboxtree/test_bboxtree.cc index 0427bf3a5926d85202df5c369330439189f04d07..4a1339ed6514266a323b11f8f3aa6d4a7fccbc65 100644 --- a/test/geometry/boundingboxtree/test_bboxtree.cc +++ b/test/geometry/boundingboxtree/test_bboxtree.cc @@ -179,7 +179,7 @@ private: } // end namespace Dumux -int main (int argc, char *argv[]) try +int main (int argc, char *argv[]) { // maybe initialize mpi Dune::MPIHelper::instance(argc, argv); @@ -490,14 +490,3 @@ int main (int argc, char *argv[]) try return 0; } -// ////////////////////////////////// -// Error handler -// ///////////////////////////////// -catch (Dumux::ParameterException &e) { - std::cerr << e << ". Abort!\n"; - return 1; -} -catch (const Dune::Exception& e) { - std::cout << e << std::endl; - return 1; -} diff --git a/test/geometry/boundingboxtree/test_geometry_fracture.cc b/test/geometry/boundingboxtree/test_geometry_fracture.cc index 810553428f7f27d4194276c3110a5da2b6218495..30e7414fb1ac46742245826273a4026d829ec57a 100644 --- a/test/geometry/boundingboxtree/test_geometry_fracture.cc +++ b/test/geometry/boundingboxtree/test_geometry_fracture.cc @@ -19,7 +19,7 @@ #include <dumux/geometry/intersectingentities.hh> #include <test/geometry/writetriangulation.hh> -int main (int argc, char *argv[]) try +int main (int argc, char *argv[]) { // maybe initialize mpi Dune::MPIHelper::instance(argc, argv); @@ -81,10 +81,3 @@ int main (int argc, char *argv[]) try return 0; } -// ////////////////////////////////// -// Error handler -// ///////////////////////////////// -catch (const Dune::Exception& e) { - std::cout << e << std::endl; - return 1; -} diff --git a/test/geometry/test_0d1d_intersection.cc b/test/geometry/test_0d1d_intersection.cc index 5051f7b2a4118e366cf3009c8d8e28e35eacfd7a..15bd5730e9053368d640c43abc8e0e41b9a3a69b 100644 --- a/test/geometry/test_0d1d_intersection.cc +++ b/test/geometry/test_0d1d_intersection.cc @@ -60,7 +60,7 @@ void testIntersections(std::vector<bool>& returns) #endif -int main (int argc, char *argv[]) try +int main (int argc, char *argv[]) { // maybe initialize mpi Dune::MPIHelper::instance(argc, argv); @@ -82,10 +82,3 @@ int main (int argc, char *argv[]) try return 0; } -// ////////////////////////////////// -// Error handler -// ///////////////////////////////// -catch (const Dune::Exception& e) { - std::cout << e << std::endl; - return 1; -} diff --git a/test/geometry/test_0d2d_intersection.cc b/test/geometry/test_0d2d_intersection.cc index 8c521e60065fd2036c7bafd27de3baff616343a9..077def4387df5b5a88601b7531671ca994b6cf96 100644 --- a/test/geometry/test_0d2d_intersection.cc +++ b/test/geometry/test_0d2d_intersection.cc @@ -84,7 +84,7 @@ void run2DIntersectionTest(std::vector<bool>& returns, const Transformation& tra } // end namespace Dumux -int main (int argc, char *argv[]) try +int main (int argc, char *argv[]) { using namespace Dumux; @@ -125,10 +125,3 @@ int main (int argc, char *argv[]) try return 0; } -// ////////////////////////////////// -// Error handler -// ///////////////////////////////// -catch (const Dune::Exception& e) { - std::cout << e << std::endl; - return 1; -} diff --git a/test/geometry/test_0d3d_intersection.cc b/test/geometry/test_0d3d_intersection.cc index 505de29f9f3f885e337fd3ed9ca6044fd01a0502..66335e81d1b70607a0daa104fe9db12fcce9de40 100644 --- a/test/geometry/test_0d3d_intersection.cc +++ b/test/geometry/test_0d3d_intersection.cc @@ -99,7 +99,7 @@ void runIntersectionTest(std::vector<bool>& returns, const Transformation& trans } // end namespace Dumux -int main (int argc, char *argv[]) try +int main (int argc, char *argv[]) { using namespace Dumux; @@ -125,10 +125,3 @@ int main (int argc, char *argv[]) try return 0; } -// ////////////////////////////////// -// Error handler -// ///////////////////////////////// -catch (const Dune::Exception& e) { - std::cout << e << std::endl; - return 1; -} diff --git a/test/geometry/test_1d1d_intersection.cc b/test/geometry/test_1d1d_intersection.cc index 142b96d346ced82dce503fc693119f2ab3e30156..0c16920668ecec0ba5e870b39d525ae399c7903e 100644 --- a/test/geometry/test_1d1d_intersection.cc +++ b/test/geometry/test_1d1d_intersection.cc @@ -185,7 +185,7 @@ void testSegmentIntersections(std::vector<bool>& returns) #endif -int main (int argc, char *argv[]) try +int main (int argc, char *argv[]) { // maybe initialize mpi Dune::MPIHelper::instance(argc, argv); @@ -213,10 +213,3 @@ int main (int argc, char *argv[]) try return 0; } -// ////////////////////////////////// -// Error handler -// ///////////////////////////////// -catch (const Dune::Exception& e) { - std::cout << e << std::endl; - return 1; -} diff --git a/test/geometry/test_1d2d_intersection.cc b/test/geometry/test_1d2d_intersection.cc index e1c8470a5fc4756d595726f70208ed1b77c291f1..b98e22cc57f187ffd3609209067b2a0238fbcec6 100644 --- a/test/geometry/test_1d2d_intersection.cc +++ b/test/geometry/test_1d2d_intersection.cc @@ -144,7 +144,7 @@ void performTests(std::vector<bool>& returns, const Quadrilateral& quad, const T #endif -int main (int argc, char *argv[]) try +int main (int argc, char *argv[]) { // maybe initialize mpi Dune::MPIHelper::instance(argc, argv); @@ -196,10 +196,3 @@ int main (int argc, char *argv[]) try return 0; } -// ////////////////////////////////// -// Error handler -// ///////////////////////////////// -catch (const Dune::Exception& e) { - std::cout << e << std::endl; - return 1; -} diff --git a/test/geometry/test_1d3d_intersection.cc b/test/geometry/test_1d3d_intersection.cc index 7f0efc3e1ffeeba01fc0fa4f58a0f9edb67b7432..62a6db21bb0436760a19005122045fad6aaabd6b 100644 --- a/test/geometry/test_1d3d_intersection.cc +++ b/test/geometry/test_1d3d_intersection.cc @@ -41,7 +41,7 @@ bool testIntersection(const Dune::MultiLinearGeometry<double, dimworld, dimworld } #endif -int main (int argc, char *argv[]) try +int main (int argc, char *argv[]) { // maybe initialize mpi Dune::MPIHelper::instance(argc, argv); @@ -126,10 +126,3 @@ int main (int argc, char *argv[]) try return 0; } -// ////////////////////////////////// -// Error handler -// ///////////////////////////////// -catch (const Dune::Exception& e) { - std::cout << e << std::endl; - return 1; -} diff --git a/test/geometry/test_2d2d_intersection.cc b/test/geometry/test_2d2d_intersection.cc index efb6de99123887d0bf6795c7fc4e4cdd414f924a..a9951bc455045a6a62f2f072d35c9f6d3d23530d 100644 --- a/test/geometry/test_2d2d_intersection.cc +++ b/test/geometry/test_2d2d_intersection.cc @@ -130,7 +130,7 @@ void testPolygonIntersections(std::vector<bool>& returns) #endif -int main(int argc, char* argv[]) try +int main(int argc, char* argv[]) { std::vector<bool> returns; testPolygonIntersections<2>(returns); @@ -146,10 +146,3 @@ int main(int argc, char* argv[]) try return 0; } -// ////////////////////////////////// -// Error handler -// ///////////////////////////////// -catch (const Dune::Exception& e) { - std::cout << e << std::endl; - return 1; -} diff --git a/test/geometry/test_2d3d_intersection.cc b/test/geometry/test_2d3d_intersection.cc index 4b518874ac1a7a8dfa83895dac0a83c66b649b83..89516b94b301a4e7ad77e047b092e587e5084e5e 100644 --- a/test/geometry/test_2d3d_intersection.cc +++ b/test/geometry/test_2d3d_intersection.cc @@ -48,7 +48,7 @@ void testSegTriangle(const Dune::FieldVector<double, dimworld>& a, } } -int main(int argc, char* argv[]) try +int main(int argc, char* argv[]) { constexpr int dimworld = 3; using Point = Dune::FieldVector<double, dimworld>; @@ -120,10 +120,3 @@ int main(int argc, char* argv[]) try return 0; } -// ////////////////////////////////// -// Error handler -// ///////////////////////////////// -catch (const Dune::Exception& e) { - std::cout << e << std::endl; - return 1; -} diff --git a/test/geometry/test_distance.cc b/test/geometry/test_distance.cc index 9f822348f76699d5496046f9d401ba53a8709ce6..c5c5990ef2acd4f3ffe02ed2b07981ca4c843038 100644 --- a/test/geometry/test_distance.cc +++ b/test/geometry/test_distance.cc @@ -131,7 +131,7 @@ void runTests() } } -int main(int argc, char** argv) try +int main(int argc, char** argv) { // affine geometries (2d) runTests< Dune::AffineGeometry<double, 0, 2>, Dune::AffineGeometry<double, 1, 2> >(); @@ -155,10 +155,3 @@ int main(int argc, char** argv) try return 0; } -// ////////////////////////////////// -// Error handler -// ///////////////////////////////// -catch (const Dune::Exception& e) { - std::cout << e << std::endl; - return 1; -} diff --git a/test/geometry/test_graham_convex_hull.cc b/test/geometry/test_graham_convex_hull.cc index f70c7881271f5ba26343ebb778f1b56e0e4f8950..500bff6cbcd553efe451c409069afc15ebcd9e27 100644 --- a/test/geometry/test_graham_convex_hull.cc +++ b/test/geometry/test_graham_convex_hull.cc @@ -96,7 +96,7 @@ void writeVTKPolyData(const std::vector<Dune::FieldVector<double, 3>>& p, << "</VTKFile>\n"; } -int main(int argc, char* argv[]) try +int main(int argc, char* argv[]) { using namespace Dumux; @@ -140,10 +140,3 @@ int main(int argc, char* argv[]) try return 0; } -// ////////////////////////////////// -// Error handler -// ///////////////////////////////// -catch (const Dune::Exception& e) { - std::cout << e << std::endl; - return 1; -} diff --git a/test/geometry/test_intersectionentityset.cc b/test/geometry/test_intersectionentityset.cc index 50ef26514214c66d2936a3c497dcacde14b0869b..d75c22544a3045c758cb1f94b28ab39caf52997f 100644 --- a/test/geometry/test_intersectionentityset.cc +++ b/test/geometry/test_intersectionentityset.cc @@ -16,7 +16,7 @@ #include <dumux/geometry/geometricentityset.hh> #include <dumux/geometry/intersectionentityset.hh> -int main (int argc, char *argv[]) try +int main (int argc, char *argv[]) { using namespace Dumux; @@ -151,10 +151,3 @@ int main (int argc, char *argv[]) try std::cout << "All tests passed!" << std::endl; return 0; } -// ////////////////////////////////// -// Error handler -// ///////////////////////////////// -catch (const Dune::Exception& e) { - std::cout << e << std::endl; - return 1; -} diff --git a/test/geometry/test_makegeometry.cc b/test/geometry/test_makegeometry.cc index b0cbcdf7b3d9dcccce642a1d95c1d47e320fd06d..ebec049c4b43243dd7357d5841373d71a0f7d1a1 100644 --- a/test/geometry/test_makegeometry.cc +++ b/test/geometry/test_makegeometry.cc @@ -168,7 +168,7 @@ void checkAxisAlignedGeometry(std::vector<GlobalPosition>& cornerPoints, } } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; using GlobalPosition = Dune::FieldVector<double, 3>; @@ -229,10 +229,3 @@ int main(int argc, char** argv) try return 0; } -// ////////////////////////////////// -// Error handler -// ///////////////////////////////// -catch (const Dune::Exception& e) { - std::cout << e << std::endl; - return 1; -} diff --git a/test/geometry/test_refinementquadraturerule.cc b/test/geometry/test_refinementquadraturerule.cc index ea097c0b175cebeafe6272e090ff82f9f7c5d4da..479fad4d71a73bae232030e0783b1996f644d9c5 100644 --- a/test/geometry/test_refinementquadraturerule.cc +++ b/test/geometry/test_refinementquadraturerule.cc @@ -9,7 +9,7 @@ #include <dune/geometry/affinegeometry.hh> #include <dumux/geometry/refinementquadraturerule.hh> -int main (int argc, char *argv[]) try +int main (int argc, char *argv[]) { using namespace Dumux; @@ -32,10 +32,3 @@ int main (int argc, char *argv[]) try return 0; } -// ////////////////////////////////// -// Error handler -// ///////////////////////////////// -catch (const Dune::Exception& e) { - std::cout << e << std::endl; - return 1; -} diff --git a/test/io/gridmanager/test_gmshboundaryflag.cc b/test/io/gridmanager/test_gmshboundaryflag.cc index 2b7399e1f0abc92e7a226419510529036ccb03fa..df8a729257412479a3d8debc30fcfc5741c79bc1 100644 --- a/test/io/gridmanager/test_gmshboundaryflag.cc +++ b/test/io/gridmanager/test_gmshboundaryflag.cc @@ -60,7 +60,7 @@ struct MyCCTpfaGridGeometryTraits : public CCTpfaDefaultGridGeometryTraits<GridV } // end namespace Dumux -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -111,13 +111,5 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) { - std::cerr << e << ". Abort!\n"; - return 1; -} -catch (Dune::Exception &e) { - std::cerr << "Dune reported error: " << e << std::endl; - return 3; -} #endif /* HAVE_DUNE_ALUGRID */ diff --git a/test/io/gridmanager/test_gridmanager_cake.cc b/test/io/gridmanager/test_gridmanager_cake.cc index dea02382a1e56aee99d99cef68ca4930b713454d..afdd70bce16226a2fe8a5ece32699ebc623b1cdb 100644 --- a/test/io/gridmanager/test_gridmanager_cake.cc +++ b/test/io/gridmanager/test_gridmanager_cake.cc @@ -70,7 +70,7 @@ void testCakeGridManager(const std::string& name) vtkWriter.write(name); } -int main(int argc, char** argv) try +int main(int argc, char** argv) { // initialize MPI, finalize is done automatically on exit Dune::MPIHelper::instance(argc, argv); @@ -87,15 +87,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) { - std::cerr << e << ". Abort!\n"; - return 1; -} -catch (Dune::Exception &e) { - std::cerr << "Dune reported error: " << e << std::endl; - return 3; -} -catch (...) { - std::cerr << "Unknown exception thrown!\n"; - return 4; -} diff --git a/test/io/gridmanager/test_gridmanager_dgf.cc b/test/io/gridmanager/test_gridmanager_dgf.cc index 295d628c458f4fba1ceec17eabc0a1a79bf3b64b..b4e4e2fbe73863aec26183bbd33a156f5f98fb72 100644 --- a/test/io/gridmanager/test_gridmanager_dgf.cc +++ b/test/io/gridmanager/test_gridmanager_dgf.cc @@ -27,7 +27,7 @@ #include "gridmanagertests.hh" -int main(int argc, char** argv) try +int main(int argc, char** argv) { Dune::MPIHelper::instance(argc, argv); @@ -39,11 +39,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) { - std::cerr << e << ". Abort!\n"; - return 1; -} -catch (Dune::Exception &e) { - std::cerr << "Dune reported error: " << e << std::endl; - return 3; -} diff --git a/test/io/gridmanager/test_gridmanager_gmsh_3d.cc b/test/io/gridmanager/test_gridmanager_gmsh_3d.cc index 18973ad61ea6d99c985e8f2585cde8df0b13e70d..0303aa2d4782062ec71261e30b9d55e0a49b5da0 100644 --- a/test/io/gridmanager/test_gridmanager_gmsh_3d.cc +++ b/test/io/gridmanager/test_gridmanager_gmsh_3d.cc @@ -27,7 +27,7 @@ #include "gridmanagertests.hh" -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; // initialize MPI, finalize is done automatically on exit @@ -39,15 +39,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) { - std::cerr << e << ". Abort!\n"; - return 1; -} -catch (Dune::Exception &e) { - std::cerr << "Dune reported error: " << e << std::endl; - return 3; -} -catch (...) { - std::cerr << "Unknown exception thrown!\n"; - return 4; -} diff --git a/test/io/gridmanager/test_gridmanager_gmsh_e_markers.cc b/test/io/gridmanager/test_gridmanager_gmsh_e_markers.cc index b43d5dec28fbe1d89c89af6d6eb3d9d1f84c9865..4fd3826811c5705d68c02b9a64886399ef8b6f21 100644 --- a/test/io/gridmanager/test_gridmanager_gmsh_e_markers.cc +++ b/test/io/gridmanager/test_gridmanager_gmsh_e_markers.cc @@ -27,7 +27,7 @@ #include "gridmanagertests.hh" -int main(int argc, char** argv) try +int main(int argc, char** argv) { Dune::MPIHelper::instance(argc, argv); @@ -38,11 +38,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) { - std::cerr << e << ". Abort!\n"; - return 1; -} -catch (Dune::Exception &e) { - std::cerr << "Dune reported error: " << e << std::endl; - return 3; -} diff --git a/test/io/gridmanager/test_gridmanager_mmesh.cc b/test/io/gridmanager/test_gridmanager_mmesh.cc index 976f666684bd3881573aba3c77ed12d4c6b86362..4d6805ad63d440eb5558a3a94b8fdf68aa202d29 100644 --- a/test/io/gridmanager/test_gridmanager_mmesh.cc +++ b/test/io/gridmanager/test_gridmanager_mmesh.cc @@ -24,7 +24,7 @@ #include <dune/grid/io/file/vtk.hh> #include <dumux/io/grid/gridmanager_mmesh.hh> -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -57,18 +57,3 @@ int main(int argc, char** argv) try return 0; } -/////////////////////////////////////// -//////// Error handler //////////////// -/////////////////////////////////////// -catch (const Dumux::ParameterException& e) { - std::cerr << e << ". Abort!\n"; - return 1; -} -catch (const Dune::Exception& e) { - std::cerr << "Dune reported error: " << e << std::endl; - return 3; -} -catch (...) { - std::cerr << "Unknown exception thrown!\n"; - return 4; -} diff --git a/test/io/gridmanager/test_gridmanager_subgrid.cc b/test/io/gridmanager/test_gridmanager_subgrid.cc index 23673ae2308e19c635d679e2ec52b3d11027a805..0426bc008b0faed96f5ad58f8147eca5a34e404a 100644 --- a/test/io/gridmanager/test_gridmanager_subgrid.cc +++ b/test/io/gridmanager/test_gridmanager_subgrid.cc @@ -139,7 +139,7 @@ void testSubGrid(const std::string& hostGridName) } } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -180,18 +180,3 @@ int main(int argc, char** argv) try return 0; } -/////////////////////////////////////// -//////// Error handler //////////////// -/////////////////////////////////////// -catch (const Dumux::ParameterException& e) { - std::cerr << e << ". Abort!\n"; - return 1; -} -catch (const Dune::Exception& e) { - std::cerr << "Dune reported error: " << e << std::endl; - return 3; -} -catch (...) { - std::cerr << "Unknown exception thrown!\n"; - return 4; -} diff --git a/test/io/gridmanager/test_gridmanager_vtk.cc b/test/io/gridmanager/test_gridmanager_vtk.cc index d1d9a843bb277d4df3978280c1e9ead42e3ab180..bde55e77b56a6878639c3e9121786dcc3fa30d40 100644 --- a/test/io/gridmanager/test_gridmanager_vtk.cc +++ b/test/io/gridmanager/test_gridmanager_vtk.cc @@ -86,7 +86,7 @@ void testVTKReader(const std::string& gridName) } // end namespace Dumux -int main(int argc, char** argv) try +int main(int argc, char** argv) { Dune::MPIHelper::instance(argc, argv); @@ -108,11 +108,3 @@ int main(int argc, char** argv) try return 77; #endif } -catch (const Dumux::ParameterException &e) { - std::cerr << e << ". Abort!\n"; - return 1; -} -catch (const Dune::Exception &e) { - std::cerr << "Dune reported error: " << e << std::endl; - return 3; -} diff --git a/test/io/vtk/test_vtk_staggeredfreeflowpvnames.cc b/test/io/vtk/test_vtk_staggeredfreeflowpvnames.cc index 30cd5de0353ef80b13f74ed65f93936a6c5eb9e7..faa4476161d6b76ecccd2a4405814c62cdd82300 100644 --- a/test/io/vtk/test_vtk_staggeredfreeflowpvnames.cc +++ b/test/io/vtk/test_vtk_staggeredfreeflowpvnames.cc @@ -292,7 +292,7 @@ void testWriteAndReadVtk(std::shared_ptr<GridGeometry> gridGeometry, } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -374,18 +374,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 2; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 3; -} diff --git a/test/io/vtk/test_vtkoutputmodule.cc b/test/io/vtk/test_vtkoutputmodule.cc index b894b095443fcdb6c3e4408f98a597aa2c25468c..b7ae1d4758be87212ae2cb2287224744a5251ed8 100644 --- a/test/io/vtk/test_vtkoutputmodule.cc +++ b/test/io/vtk/test_vtkoutputmodule.cc @@ -9,7 +9,7 @@ #include <dumux/io/vtkoutputmodule.hh> #include <dumux/discretization/cellcentered/tpfa/fvgridgeometry.hh> -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -77,13 +77,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} diff --git a/test/io/vtk/test_vtkreader.cc b/test/io/vtk/test_vtkreader.cc index 4d58feb985420b7aaffd897830f36cb0283caaa4..fe05d7533ccdffdd3f5a39cce784f0cf179d7dea 100644 --- a/test/io/vtk/test_vtkreader.cc +++ b/test/io/vtk/test_vtkreader.cc @@ -40,7 +40,7 @@ #include <dumux/common/exceptions.hh> #include <dumux/io/vtk/vtkreader.hh> -int main(int argc, char** argv) try +int main(int argc, char** argv) { Dune::MPIHelper::instance(argc, argv); @@ -105,11 +105,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dune::Exception& e) { - std::cerr << "Dune reported error: " << e << std::endl; - return 1; -} -catch (std::exception& e) { - std::cerr << "stdlib reported error: " << e.what() << std::endl; - return 2; -} diff --git a/test/linear/test_linearsolver.cc b/test/linear/test_linearsolver.cc index 0586710f4fe60d7c5ca685753b9c96854d3b5300..0893455a19f4b9936d60a74523ffaae286c72b67 100644 --- a/test/linear/test_linearsolver.cc +++ b/test/linear/test_linearsolver.cc @@ -50,7 +50,7 @@ void solveWithFactory(M& A, X& x, V& b, const std::string& paramGroup) } // end namespace Dumux::Test -int main(int argc, char* argv[]) try +int main(int argc, char* argv[]) { using namespace Dumux; @@ -88,8 +88,3 @@ int main(int argc, char* argv[]) try return 0; } -catch (const Dune::Exception& e) -{ - std::cout << e << std::endl; - return 1; -} diff --git a/test/material/fluidmatrixinteractions/2p/test_material_2p_brookscorey.cc b/test/material/fluidmatrixinteractions/2p/test_material_2p_brookscorey.cc index ac91436af8a045af9eae91c3ed776b12d2ecd324..c9e487ba50640231816e4a572249f1200d22f1eb 100644 --- a/test/material/fluidmatrixinteractions/2p/test_material_2p_brookscorey.cc +++ b/test/material/fluidmatrixinteractions/2p/test_material_2p_brookscorey.cc @@ -30,7 +30,7 @@ void checkEndPointPc(const typename Law::Params& params) } // end namespace Dumux -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -58,9 +58,3 @@ int main(int argc, char** argv) try return 0; } -// error handler -catch (const Dune::Exception& e) -{ - std::cerr << "Test failed with exception: " << e << std::endl; - return 1; -} diff --git a/test/material/fluidmatrixinteractions/2p/test_material_2p_vangenuchten.cc b/test/material/fluidmatrixinteractions/2p/test_material_2p_vangenuchten.cc index d932bc576f0cbf32f1b6361150d202d0eee6c721..fa2830c8c03d00f6ae5cdc3d743a1ff2f32a7478 100644 --- a/test/material/fluidmatrixinteractions/2p/test_material_2p_vangenuchten.cc +++ b/test/material/fluidmatrixinteractions/2p/test_material_2p_vangenuchten.cc @@ -27,7 +27,7 @@ void checkEndPointPc(const typename Law::Params& params) } // end namespace Dumux -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -59,9 +59,3 @@ int main(int argc, char** argv) try return 0; } -// error handler -catch (const Dune::Exception& e) -{ - std::cerr << "Test failed with exception: " << e << std::endl; - return 1; -} diff --git a/test/material/solidsystems/test_solidsystems.cc b/test/material/solidsystems/test_solidsystems.cc index 9bee70702349ff1fc27cadd9cbe3f22e9ff53578..170d603775a4fee704f66c9de7f607d1ac8171f9 100644 --- a/test/material/solidsystems/test_solidsystems.cc +++ b/test/material/solidsystems/test_solidsystems.cc @@ -40,7 +40,7 @@ #include <dumux/material/components/nacl.hh> #include <dumux/material/components/solid.hh> -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; using Scalar = double; @@ -119,14 +119,3 @@ int main(int argc, char** argv) try return success; } // end main - -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/multidomain/boundary/darcydarcy/1p_1p/main.cc b/test/multidomain/boundary/darcydarcy/1p_1p/main.cc index 271ddaf52ad681e2719d857bc442db1b71f4ca94..21df844112b7418b125c8686e68518d77ccba55e 100644 --- a/test/multidomain/boundary/darcydarcy/1p_1p/main.cc +++ b/test/multidomain/boundary/darcydarcy/1p_1p/main.cc @@ -115,7 +115,7 @@ struct Problem<TypeTag, TTag::OnePSub1> { using type = OnePTestProblem<TypeTag, } // end namespace Properties } // end namespace Dumux -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -331,29 +331,3 @@ int main(int argc, char** argv) try return 0; } - -// error handler -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/multidomain/boundary/darcydarcy/1p_2p/main.cc b/test/multidomain/boundary/darcydarcy/1p_2p/main.cc index 17f44a6b690098ef168e64e1e87f5201ccda0784..7c913aed7b849ed19061bcc02927a794ff4cded0 100644 --- a/test/multidomain/boundary/darcydarcy/1p_2p/main.cc +++ b/test/multidomain/boundary/darcydarcy/1p_2p/main.cc @@ -114,7 +114,7 @@ struct Problem<TypeTag, TTag::OnePSub1> { using type = OnePTestProblem<TypeTag, } // end namespace Properties } // end namespace Dumux -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -292,29 +292,3 @@ int main(int argc, char** argv) try return 0; } - -// error handler -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/diffusionlawcomparison/main.cc b/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/diffusionlawcomparison/main.cc index e457f6ff882058f275e11947a934ec8b95fa9207..3c738de2e06a6a0052cfe9463ba1fcfa56d5c543 100644 --- a/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/diffusionlawcomparison/main.cc +++ b/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/diffusionlawcomparison/main.cc @@ -75,7 +75,7 @@ struct CouplingManager<TypeTag, TTag::DarcyOnePTwoC> } // end namespace Properties } // end namespace Dumux -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -266,27 +266,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/main.cc b/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/main.cc index 4d5e8b956107ae9e9929a2fd6c9bfdd4112dd7fd..232f6b1bba902d02de061f2cad55ceaba6bffe30 100644 --- a/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/main.cc +++ b/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/main.cc @@ -74,7 +74,7 @@ struct CouplingManager<TypeTag, TTag::DarcyOnePTwoC> } // end namespace Properties } // end namespace Dumux -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -246,27 +246,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/multidomain/boundary/stokesdarcy/1p2c_2p2c/main.cc b/test/multidomain/boundary/stokesdarcy/1p2c_2p2c/main.cc index 50c0de1e6148df7391116ed17612ca7ab41a90af..2ed227d596329d341f63d8db476c24e98496e1b7 100644 --- a/test/multidomain/boundary/stokesdarcy/1p2c_2p2c/main.cc +++ b/test/multidomain/boundary/stokesdarcy/1p2c_2p2c/main.cc @@ -75,7 +75,7 @@ struct CouplingManager<TypeTag, TTag::DarcyTwoPTwoC> } // end namespace Properties } // end namespace Dumux -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -278,27 +278,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/multidomain/boundary/stokesdarcy/1p3c_1p3c/main.cc b/test/multidomain/boundary/stokesdarcy/1p3c_1p3c/main.cc index a9550162abfa41d2da5c0f34387dd3652b4f0c34..68f338b72f1ed7557b68789db8acdff3d346a0d1 100644 --- a/test/multidomain/boundary/stokesdarcy/1p3c_1p3c/main.cc +++ b/test/multidomain/boundary/stokesdarcy/1p3c_1p3c/main.cc @@ -74,7 +74,7 @@ struct CouplingManager<TypeTag, TTag::DarcyOnePThreeC> } // end namespace Properties } // end namespace Dumux -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -246,27 +246,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/multidomain/boundary/stokesdarcy/1p_1p/convergencetest/main.cc b/test/multidomain/boundary/stokesdarcy/1p_1p/convergencetest/main.cc index ab63df6110c9a7b0701c9e22bfcadcafd2adf0d9..cecb1580c5f276a4af06f724126892d8a719a505 100644 --- a/test/multidomain/boundary/stokesdarcy/1p_1p/convergencetest/main.cc +++ b/test/multidomain/boundary/stokesdarcy/1p_1p/convergencetest/main.cc @@ -237,7 +237,7 @@ void printDarcyL2Error(const Problem& problem, const SolutionVector& x) logFile.close(); } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -390,27 +390,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/multidomain/boundary/stokesdarcy/1p_1p/main.cc b/test/multidomain/boundary/stokesdarcy/1p_1p/main.cc index 28519da129b5f1633e9b7ca57c35f5c9ab1d385b..0b9343669ed24daa2a7ceab6b2da14b075279f14 100644 --- a/test/multidomain/boundary/stokesdarcy/1p_1p/main.cc +++ b/test/multidomain/boundary/stokesdarcy/1p_1p/main.cc @@ -72,7 +72,7 @@ struct CouplingManager<TypeTag, TTag::DarcyOneP> } // end namespace Properties } // end namespace Dumux -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -198,27 +198,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/multidomain/boundary/stokesdarcy/1p_2p/main.cc b/test/multidomain/boundary/stokesdarcy/1p_2p/main.cc index 771d54f04ee36879e598239f344267ecb5d3a1f4..dffc2545e34e06127726bad9261e6ae792ca290d 100644 --- a/test/multidomain/boundary/stokesdarcy/1p_2p/main.cc +++ b/test/multidomain/boundary/stokesdarcy/1p_2p/main.cc @@ -107,7 +107,7 @@ struct FluidSystem<TypeTag, TTag::DarcyTwoP> } // end namespace Properties } // end namespace Dumux -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -277,27 +277,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/multidomain/embedded/1d3d/1p2c_richards2c/main.cc b/test/multidomain/embedded/1d3d/1p2c_richards2c/main.cc index ad62d28fd7ae96d0bdacfeac5241dada85a2e06a..b8286b19069a2c1a792a7c76d56a3126a9bba8be 100644 --- a/test/multidomain/embedded/1d3d/1p2c_richards2c/main.cc +++ b/test/multidomain/embedded/1d3d/1p2c_richards2c/main.cc @@ -172,7 +172,7 @@ double computeGlobalBoundaryMass(const Problem& problem, const SolutionVector& s } // end namespace Dumux -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -466,27 +466,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/multidomain/embedded/1d3d/1p_1p/main.cc b/test/multidomain/embedded/1d3d/1p_1p/main.cc index 9b7427ab04f690d8c360f64fe22397766da2133f..866bad7a159ed467fc65ad1345257dcef5de7b45 100644 --- a/test/multidomain/embedded/1d3d/1p_1p/main.cc +++ b/test/multidomain/embedded/1d3d/1p_1p/main.cc @@ -86,7 +86,7 @@ struct PointSourceHelper<TypeTag, TTag::LOWDIMTYPETAG> { using type = typename G } // end namespace Properties } // end namespace Dumux -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -275,27 +275,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/multidomain/embedded/1d3d/1p_richards/main.cc b/test/multidomain/embedded/1d3d/1p_richards/main.cc index a7d264ecdfc14967cb40254c59fd7fa09094f4f4..dce774e34115370ad78830630388d507d2017924 100644 --- a/test/multidomain/embedded/1d3d/1p_richards/main.cc +++ b/test/multidomain/embedded/1d3d/1p_richards/main.cc @@ -79,7 +79,7 @@ struct PointSourceHelper<TypeTag, TTag::Root> { using type = typename GetPropTyp } // end namespace Properties } // end namespace Dumux -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -251,27 +251,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/multidomain/embedded/2d3d/1p_1p/main.cc b/test/multidomain/embedded/2d3d/1p_1p/main.cc index 1d1ff9c59db08b453732ad9aadc002ca594554a1..fffe9cf73980496ca2cafafc2a05e994e77f258e 100644 --- a/test/multidomain/embedded/2d3d/1p_1p/main.cc +++ b/test/multidomain/embedded/2d3d/1p_1p/main.cc @@ -134,7 +134,7 @@ void assembleSolveUpdate(Assembler& assembler, LinearSolver& linearSolver, Coupl } // end namespace Dumux -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -267,27 +267,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/multidomain/facet/1p_1p/analytical/main.cc b/test/multidomain/facet/1p_1p/analytical/main.cc index 26644b774bc583d00ec73da74e0b77d6829e5836..4ac82416b1f7620b15e4aba2ccf1b4c4bc981076 100644 --- a/test/multidomain/facet/1p_1p/analytical/main.cc +++ b/test/multidomain/facet/1p_1p/analytical/main.cc @@ -188,7 +188,7 @@ void updateBulkFVGridGeometry(GridGeometry& gridGeometry, } // main program -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -376,27 +376,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/multidomain/facet/1p_1p/gravity/main.cc b/test/multidomain/facet/1p_1p/gravity/main.cc index 987a3b6d5e014f4b90f739f8014fb728a82d5354..fa858796409200ef3ef48e41b14668ad8a892b1f 100644 --- a/test/multidomain/facet/1p_1p/gravity/main.cc +++ b/test/multidomain/facet/1p_1p/gravity/main.cc @@ -75,7 +75,7 @@ template<class TypeTag> struct CouplingManager<TypeTag, TTag::OnePLowDimMpfa> { } // end namespace Dumux // main program -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -211,27 +211,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/multidomain/facet/1p_1p/linearprofile/main.cc b/test/multidomain/facet/1p_1p/linearprofile/main.cc index b50d1f9863a67233b2aa6ab987da29e476b3e850..6ac2ad911834be46ad5c72eda61d79e91d72d69b 100644 --- a/test/multidomain/facet/1p_1p/linearprofile/main.cc +++ b/test/multidomain/facet/1p_1p/linearprofile/main.cc @@ -74,7 +74,7 @@ template<class TypeTag> struct CouplingManager<TypeTag, TTag::OnePLowDimMpfa> { } // end namespace Dumux // main program -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -210,27 +210,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/multidomain/facet/1p_1p/threedomain/main.cc b/test/multidomain/facet/1p_1p/threedomain/main.cc index 85de4b83f594859b0c801f27c1d2ec2bbc67398a..0be34ab9e0dd938f257788afbe31c3739a04b5c9 100644 --- a/test/multidomain/facet/1p_1p/threedomain/main.cc +++ b/test/multidomain/facet/1p_1p/threedomain/main.cc @@ -133,7 +133,7 @@ void updateFVGridGeometry(GridGeometry& gridGeometry, gridGeometry.update(); } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -257,27 +257,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/multidomain/facet/1pnc_1pnc/main.cc b/test/multidomain/facet/1pnc_1pnc/main.cc index 18f453171bf1488aa9ea73caf3be287534b05a2c..21b19254e15217b9de00905b31b8ec8ada0455a7 100644 --- a/test/multidomain/facet/1pnc_1pnc/main.cc +++ b/test/multidomain/facet/1pnc_1pnc/main.cc @@ -107,7 +107,7 @@ void updateBulkFVGridGeometry(GridGeometry& gridGeometry, } // main program -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -243,27 +243,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/multidomain/facet/test_facetcouplingmapper.cc b/test/multidomain/facet/test_facetcouplingmapper.cc index bb903d4b7e02c0ea36ca8367e7bbee9db27591a8..98b3a7e68ed5ad49be284b178a455581d37f213c 100644 --- a/test/multidomain/facet/test_facetcouplingmapper.cc +++ b/test/multidomain/facet/test_facetcouplingmapper.cc @@ -114,7 +114,7 @@ void updateBulkFvGeometry(BulkFVG& bulkFVG, const FacetFVG& facetFVG, const Grid } // main program -int main (int argc, char *argv[]) try +int main (int argc, char *argv[]) { // maybe initialize mpi Dune::MPIHelper::instance(argc, argv); @@ -349,14 +349,3 @@ int main (int argc, char *argv[]) try // everything is ok std::cout << "\n... test passed!" << std::endl; } -//////////////////////////////////// -// Error handler -//////////////////////////////////// -catch (Dune::Exception& e) { - std::cout << e << std::endl; - return 1; -} -catch (...) { - std::cout << "Unknown exception thrown" << std::endl; - return 1; -} diff --git a/test/multidomain/facet/test_facetcouplingmapper_boundary.cc b/test/multidomain/facet/test_facetcouplingmapper_boundary.cc index 5f42fea4712f1f0896bb024692a89db670d1cc1b..d6faa414153e506ef1ff17edf9afc5f5e36a66bb 100644 --- a/test/multidomain/facet/test_facetcouplingmapper_boundary.cc +++ b/test/multidomain/facet/test_facetcouplingmapper_boundary.cc @@ -50,7 +50,7 @@ bool checkEquality(const Pos1& p1, const Pos2& p2, typename Pos1::value_type eps return std::all_of(d.begin(), d.end(), [eps] (auto coord) { return abs(coord) < eps; }); } -int main (int argc, char *argv[]) try +int main (int argc, char *argv[]) { // maybe initialize mpi Dune::MPIHelper::instance(argc, argv); @@ -132,14 +132,3 @@ int main (int argc, char *argv[]) try // everything is ok std::cout << "\n... test passed!" << std::endl; } -// ////////////////////////////////// -// Error handler -// ///////////////////////////////// -catch (Dune::Exception& e) { - std::cout << e << std::endl; - return 1; -} -catch (...) { - std::cout << "Unknown exception thrown" << std::endl; - return 1; -} diff --git a/test/multidomain/facet/test_gridmanager.cc b/test/multidomain/facet/test_gridmanager.cc index ce40d13cae6d3feee80ff34618196f935419a262..98d2396efd3666e27b3400e15066ed8a2e278427 100644 --- a/test/multidomain/facet/test_gridmanager.cc +++ b/test/multidomain/facet/test_gridmanager.cc @@ -43,7 +43,7 @@ #define BULKGRIDTYPE Dune::UGGrid<3> #endif -int main (int argc, char *argv[]) try +int main (int argc, char *argv[]) { // maybe initialize mpi Dune::MPIHelper::instance(argc, argv); @@ -275,10 +275,3 @@ int main (int argc, char *argv[]) try using EdgeWriter = Dune::VTKWriter<typename EdgeGrid::LeafGridView>; EdgeWriter edgeWriter(edgeGridView); edgeWriter.write("edgegrid"); } -// ////////////////////////////////// -// Error handler -// ///////////////////////////////// -catch (Dune::Exception& e) { - std::cout << e << std::endl; - return 1; -} diff --git a/test/multidomain/facet/test_vertexmapper.cc b/test/multidomain/facet/test_vertexmapper.cc index 7a0c07b05ddbb65fbeb446e05fc33ac225590253..48f4956c13bcee6115927d9c98b0bc3363e60b23 100644 --- a/test/multidomain/facet/test_vertexmapper.cc +++ b/test/multidomain/facet/test_vertexmapper.cc @@ -92,7 +92,7 @@ GlobalPosition getDisplacement(const GlobalPosition& pos) DUNE_THROW(Dune::InvalidStateException, "Invalid position provided: " << pos); } -int main (int argc, char *argv[]) try +int main (int argc, char *argv[]) { // initialize mpi Dune::MPIHelper::instance(argc, argv); @@ -168,16 +168,3 @@ int main (int argc, char *argv[]) try return 0; } -// ////////////////////////////////// -// Error handler -// ///////////////////////////////// -catch (Dune::Exception& e) -{ - std::cout << e << std::endl; - return 1; -} -catch (...) -{ - std::cout << "Unknown exception thrown" << std::endl; - return 1; -} diff --git a/test/multidomain/facet/tracer_tracer/main.cc b/test/multidomain/facet/tracer_tracer/main.cc index e71e4427b725d3624f6c603229be6d6aad3cfafa..fe752ec0944333082a0d5e35e08809e431a30095 100644 --- a/test/multidomain/facet/tracer_tracer/main.cc +++ b/test/multidomain/facet/tracer_tracer/main.cc @@ -212,7 +212,7 @@ void computeVolumeFluxes(Storage& volumeFluxes, } // main program -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -505,27 +505,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/multidomain/poromechanics/el1p/main.cc b/test/multidomain/poromechanics/el1p/main.cc index 992cfe962c1f6a5a390dd601b66aa1ef8edaf1a8..7c1d07fa89a71de6fcdb7ba5f2862a4f221b5fce 100644 --- a/test/multidomain/poromechanics/el1p/main.cc +++ b/test/multidomain/poromechanics/el1p/main.cc @@ -72,7 +72,7 @@ public: } // end namespace Properties } // end namespace Dumux -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -204,27 +204,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/multidomain/poromechanics/el2p/main.cc b/test/multidomain/poromechanics/el2p/main.cc index f53a190f27b589be1e9ff823f2bf19084ab10bc6..7291bae011d2984e9b052469c13e4d3a4f592e2f 100644 --- a/test/multidomain/poromechanics/el2p/main.cc +++ b/test/multidomain/poromechanics/el2p/main.cc @@ -74,7 +74,7 @@ public: } // end namespace Properties } // end namespace Dumux -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -246,27 +246,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/nonlinear/findscalarroot/test_findscalarroot.cc b/test/nonlinear/findscalarroot/test_findscalarroot.cc index 88dcbea99255a45c4abeb97747ddd4b0c75db6bb..d008aff2b7e283165c8551db7646bd72d6fd19b9 100644 --- a/test/nonlinear/findscalarroot/test_findscalarroot.cc +++ b/test/nonlinear/findscalarroot/test_findscalarroot.cc @@ -8,7 +8,7 @@ #include <dune/common/float_cmp.hh> #include <dumux/nonlinear/findscalarroot.hh> -int main(int argc, char* argv[]) try +int main(int argc, char* argv[]) { using namespace Dumux; @@ -38,13 +38,3 @@ int main(int argc, char* argv[]) try return 0; } -catch (const Dune::Exception& e) -{ - std::cout << e << std::endl; - return 1; -} -catch (...) -{ - std::cout << "Unknown exception thrown!" << std::endl; - return 1; -} diff --git a/test/nonlinear/newton/test_newton.cc b/test/nonlinear/newton/test_newton.cc index 7394386149898ec3212761a79b835f00c57b6195..3a0d48a0d718424e2dc0ce5af7e5adfac46eea84 100644 --- a/test/nonlinear/newton/test_newton.cc +++ b/test/nonlinear/newton/test_newton.cc @@ -87,7 +87,7 @@ public: } // end namespace Dumux -int main(int argc, char* argv[]) try +int main(int argc, char* argv[]) { using namespace Dumux; @@ -124,13 +124,3 @@ int main(int argc, char* argv[]) try return 0; } -catch (const Dune::Exception& e) -{ - std::cout << e << std::endl; - return 1; -} -catch (...) -{ - std::cout << "Unknown exception thrown!" << std::endl; - return 1; -} diff --git a/test/porousmediumflow/1p/implicit/compressible/instationary/main.cc b/test/porousmediumflow/1p/implicit/compressible/instationary/main.cc index ddf18f530593b2b94650ae1e05c76fdfb3f6a6d9..509e4eb9faecfa3478c430bd9d07fae74caaf02d 100644 --- a/test/porousmediumflow/1p/implicit/compressible/instationary/main.cc +++ b/test/porousmediumflow/1p/implicit/compressible/instationary/main.cc @@ -31,7 +31,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -49,7 +48,7 @@ #include <dumux/io/vtkoutputmodule.hh> #include <dumux/io/grid/gridmanager.hh> -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -174,27 +173,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/1p/implicit/compressible/stationary/main.cc b/test/porousmediumflow/1p/implicit/compressible/stationary/main.cc index 6e9e6c3bbb74986d56913b19ede72dc18362944d..26566d80be42f902591ecec226d1e90fad344a21 100644 --- a/test/porousmediumflow/1p/implicit/compressible/stationary/main.cc +++ b/test/porousmediumflow/1p/implicit/compressible/stationary/main.cc @@ -31,7 +31,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -47,7 +46,7 @@ #include <dumux/io/vtkoutputmodule.hh> #include <dumux/io/grid/gridmanager.hh> -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -144,27 +143,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/1p/implicit/convergence/analyticsolution/main.cc b/test/porousmediumflow/1p/implicit/convergence/analyticsolution/main.cc index 126598f7ae154e49902f9d26cdca3943e1d160d9..2c15f35aae685e6bea56429fa7b70e7c983696a6 100644 --- a/test/porousmediumflow/1p/implicit/convergence/analyticsolution/main.cc +++ b/test/porousmediumflow/1p/implicit/convergence/analyticsolution/main.cc @@ -26,7 +26,6 @@ #include <iomanip> #include <dune/common/parallel/mpihelper.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dumux/nonlinear/newtonsolver.hh> #include <dumux/linear/seqsolverbackend.hh> @@ -80,7 +79,7 @@ void printL2Error(const Problem& problem, const SolutionVector& x) logFile.close(); } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -161,22 +160,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} diff --git a/test/porousmediumflow/1p/implicit/convergence/discretesolution/main.cc b/test/porousmediumflow/1p/implicit/convergence/discretesolution/main.cc index 7fa845f47b095fb241616570df4691cb1c9d9dab..a1e8344c32cdcd318e76505e2252fb60190a277b 100644 --- a/test/porousmediumflow/1p/implicit/convergence/discretesolution/main.cc +++ b/test/porousmediumflow/1p/implicit/convergence/discretesolution/main.cc @@ -45,7 +45,7 @@ #include <dumux/discretization/projection/projector.hh> // main program -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; using TypeTag = Properties::TTag::TYPETAG; @@ -186,27 +186,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/1p/implicit/convergence/discretesolution/solver.hh b/test/porousmediumflow/1p/implicit/convergence/discretesolution/solver.hh index 371324473a00b8671b937be604f779900866464a..38608680a0e073380251b3b0a71fbc7f35136351 100644 --- a/test/porousmediumflow/1p/implicit/convergence/discretesolution/solver.hh +++ b/test/porousmediumflow/1p/implicit/convergence/discretesolution/solver.hh @@ -28,7 +28,6 @@ #include <string> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dumux/linear/seqsolverbackend.hh> diff --git a/test/porousmediumflow/1p/implicit/fracture2d3d/main.cc b/test/porousmediumflow/1p/implicit/fracture2d3d/main.cc index e6c248c6ca26afd3739b9171fd2f1f1e1f2e33ee..8e8d1e13e09fdb782b80192f555285c2fcd17735 100644 --- a/test/porousmediumflow/1p/implicit/fracture2d3d/main.cc +++ b/test/porousmediumflow/1p/implicit/fracture2d3d/main.cc @@ -29,7 +29,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -75,7 +74,7 @@ void usage(const char *progName, const std::string &errorMsg) } } -int main(int argc, char** argv) try +int main(int argc, char** argv) { #if HAVE_DUNE_FOAMGRID using namespace Dumux; @@ -200,27 +199,3 @@ int main(int argc, char** argv) try #endif } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/1p/implicit/incompressible/main.cc b/test/porousmediumflow/1p/implicit/incompressible/main.cc index 0b3a3749cf43a84946a56efc4539af7861b9b29a..4f3818bcb715445259643d91050e2c4f3c725297 100644 --- a/test/porousmediumflow/1p/implicit/incompressible/main.cc +++ b/test/porousmediumflow/1p/implicit/incompressible/main.cc @@ -30,7 +30,6 @@ #include <dune/common/float_cmp.hh> #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dumux/linear/seqsolverbackend.hh> @@ -76,7 +75,7 @@ void writeMpfaVelocities(const GridGeometry& gridGeometry, const Sol& x) {} -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -209,27 +208,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/1p/implicit/isothermal/main.cc b/test/porousmediumflow/1p/implicit/isothermal/main.cc index 4de2454e2f907894d74edd64b1ddca2f8e6b72d0..53eae1f381569892bc8f854d88d5e0e6462007f3 100644 --- a/test/porousmediumflow/1p/implicit/isothermal/main.cc +++ b/test/porousmediumflow/1p/implicit/isothermal/main.cc @@ -29,7 +29,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -82,7 +81,7 @@ void usage(const char *progName, const std::string &errorMsg) } } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -204,27 +203,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/1p/implicit/network1d3d/main.cc b/test/porousmediumflow/1p/implicit/network1d3d/main.cc index 2e258f7c163fd6a4f17fde7db9ba260a7d2e8766..c82ffbe05fc15edcd8b2c722b8a5c3ae09cc6c89 100644 --- a/test/porousmediumflow/1p/implicit/network1d3d/main.cc +++ b/test/porousmediumflow/1p/implicit/network1d3d/main.cc @@ -29,7 +29,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -75,7 +74,7 @@ void usage(const char *progName, const std::string &errorMsg) } } -int main(int argc, char** argv) try +int main(int argc, char** argv) { #if HAVE_DUNE_FOAMGRID using namespace Dumux; @@ -203,27 +202,3 @@ int main(int argc, char** argv) try #endif } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/1p/implicit/nonisothermal/main.cc b/test/porousmediumflow/1p/implicit/nonisothermal/main.cc index 9cffbe493223b2eb72b8f02ce85a1c07d5a79381..c1569a4c94c4a936cb214552c4d20d483bb0ee91 100644 --- a/test/porousmediumflow/1p/implicit/nonisothermal/main.cc +++ b/test/porousmediumflow/1p/implicit/nonisothermal/main.cc @@ -29,7 +29,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -79,7 +78,7 @@ void usage(const char *progName, const std::string &errorMsg) } } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -216,27 +215,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/1p/implicit/periodicbc/main.cc b/test/porousmediumflow/1p/implicit/periodicbc/main.cc index 7b01d2f217ad6f7ef9f7b317db31e40379ef0423..9a420da9df53d9d0c116336dddb1919c03d6687c 100644 --- a/test/porousmediumflow/1p/implicit/periodicbc/main.cc +++ b/test/porousmediumflow/1p/implicit/periodicbc/main.cc @@ -29,7 +29,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dumux/linear/amgbackend.hh> @@ -46,7 +45,7 @@ #include "problem.hh" -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -157,27 +156,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/1p/implicit/pointsources/timedependent/main.cc b/test/porousmediumflow/1p/implicit/pointsources/timedependent/main.cc index 3bbdcb7ab98129eb31e3cd497a4f28234ed0c3af..d6c388f43edbb1192cfda9360c53af81f6269696 100644 --- a/test/porousmediumflow/1p/implicit/pointsources/timedependent/main.cc +++ b/test/porousmediumflow/1p/implicit/pointsources/timedependent/main.cc @@ -29,7 +29,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -51,7 +50,7 @@ #include <dumux/io/vtkoutputmodule.hh> #include <dumux/io/grid/gridmanager.hh> -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -172,27 +171,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/1p/implicit/pointsources/timeindependent/main.cc b/test/porousmediumflow/1p/implicit/pointsources/timeindependent/main.cc index dc367256a196879095a857d4cee159522af119cc..ed1c0563a7815492faf803e8a7c98a195a9f8ec9 100644 --- a/test/porousmediumflow/1p/implicit/pointsources/timeindependent/main.cc +++ b/test/porousmediumflow/1p/implicit/pointsources/timeindependent/main.cc @@ -29,7 +29,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -51,7 +50,7 @@ #include <dumux/io/vtkoutputmodule.hh> #include <dumux/io/grid/gridmanager.hh> -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -169,27 +168,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/1p/sequential/test_diffusion.cc b/test/porousmediumflow/1p/sequential/test_diffusion.cc index f616c8a6385878cdff84ec8aa114cd58c1b162e0..0791d0108153c57c6bb3b1704ff217007efe6b22 100644 --- a/test/porousmediumflow/1p/sequential/test_diffusion.cc +++ b/test/porousmediumflow/1p/sequential/test_diffusion.cc @@ -55,83 +55,72 @@ int main(int argc, char** argv) { using namespace Dumux; - try { - using TypeTag = Properties::TTag::FVVelocity2PTestTypeTag; - - // initialize MPI, finalize is done automatically on exit - Dune::MPIHelper::instance(argc, argv); - - auto defaultParams = [] (Dune::ParameterTree& p) {GetProp<TypeTag, Properties::ModelDefaultParameters>::defaultParams(p);}; - Dumux::Parameters::init(argc, argv, defaultParams, usage); - - //////////////////////////////////////////////////////////// - // create the grid - //////////////////////////////////////////////////////////// - Dumux::GridManager<GetPropType<TypeTag, Properties::Grid>> gridManager; - gridManager.init(); - auto& grid = gridManager.grid(); - - //////////////////////////////////////////////////////////// - // instantiate and run the concrete problem - //////////////////////////////////////////////////////////// - Dune::Timer timer; - bool consecutiveNumbering = true; - - using FVProblem = GetPropType<Properties::TTag::FVVelocity2PTestTypeTag, Properties::Problem>; - FVProblem fvProblem(grid); - fvProblem.setName("fvdiffusion"); - timer.reset(); - fvProblem.init(); - fvProblem.calculateFVVelocity(); - double fvTime = timer.elapsed(); - fvProblem.writeOutput(); - Dumux::ResultEvaluation fvResult; - fvResult.evaluate(grid.leafGridView(), fvProblem, consecutiveNumbering); - - using MPFAOProblem = GetPropType<Properties::TTag::FVMPFAOVelocity2PTestTypeTag, Properties::Problem>; - MPFAOProblem mpfaProblem(grid); - mpfaProblem.setName("fvmpfaodiffusion"); - timer.reset(); - mpfaProblem.init(); - double mpfaTime = timer.elapsed(); - mpfaProblem.writeOutput(); - Dumux::ResultEvaluation mpfaResult; - mpfaResult.evaluate(grid.leafGridView(), mpfaProblem, consecutiveNumbering); - - using MimeticProblem = GetPropType<Properties::TTag::MimeticPressure2PTestTypeTag, Properties::Problem>; - MimeticProblem mimeticProblem(grid); - mimeticProblem.setName("mimeticdiffusion"); - timer.reset(); - mimeticProblem.init(); - double mimeticTime = timer.elapsed(); - mimeticProblem.writeOutput(); - Dumux::ResultEvaluation mimeticResult; - mimeticResult.evaluate(grid.leafGridView(), mimeticProblem, consecutiveNumbering); - - std::cout.setf(std::ios_base::scientific, std::ios_base::floatfield); - std::cout.precision(2); - std::cout << "\t error press \t error grad\t sumflux\t erflm\t\t uMin\t\t uMax\t\t time" << std::endl; - std::cout << "2pfa\t " << fvResult.relativeL2Error << "\t " << fvResult.ergrad << "\t " << fvResult.sumflux - << "\t " << fvResult.erflm << "\t " << fvResult.uMin - << "\t " << fvResult.uMax << "\t " << fvTime << std::endl; - std::cout << "mpfa-o\t " << mpfaResult.relativeL2Error << "\t " << mpfaResult.ergrad - << "\t " << mpfaResult.sumflux << "\t " << mpfaResult.erflm - << "\t " << mpfaResult.uMin << "\t " << mpfaResult.uMax << "\t " << mpfaTime << std::endl; - std::cout << "mimetic\t " << mimeticResult.relativeL2Error << "\t " << mimeticResult.ergrad - << "\t " << mimeticResult.sumflux << "\t " << mimeticResult.erflm - << "\t " << mimeticResult.uMin << "\t " << mimeticResult.uMax << "\t " << mimeticTime << std::endl; - - - - return 0; - } - catch (Dune::Exception &e) { - std::cerr << "Dune reported error: " << e << std::endl; - } - catch (...) { - std::cerr << "Unknown exception thrown!\n"; - throw; - } - - return 3; + using TypeTag = Properties::TTag::FVVelocity2PTestTypeTag; + + // initialize MPI, finalize is done automatically on exit + Dune::MPIHelper::instance(argc, argv); + + auto defaultParams = [] (Dune::ParameterTree& p) {GetProp<TypeTag, Properties::ModelDefaultParameters>::defaultParams(p);}; + Dumux::Parameters::init(argc, argv, defaultParams, usage); + + //////////////////////////////////////////////////////////// + // create the grid + //////////////////////////////////////////////////////////// + Dumux::GridManager<GetPropType<TypeTag, Properties::Grid>> gridManager; + gridManager.init(); + auto& grid = gridManager.grid(); + + //////////////////////////////////////////////////////////// + // instantiate and run the concrete problem + //////////////////////////////////////////////////////////// + Dune::Timer timer; + bool consecutiveNumbering = true; + + using FVProblem = GetPropType<Properties::TTag::FVVelocity2PTestTypeTag, Properties::Problem>; + FVProblem fvProblem(grid); + fvProblem.setName("fvdiffusion"); + timer.reset(); + fvProblem.init(); + fvProblem.calculateFVVelocity(); + double fvTime = timer.elapsed(); + fvProblem.writeOutput(); + Dumux::ResultEvaluation fvResult; + fvResult.evaluate(grid.leafGridView(), fvProblem, consecutiveNumbering); + + using MPFAOProblem = GetPropType<Properties::TTag::FVMPFAOVelocity2PTestTypeTag, Properties::Problem>; + MPFAOProblem mpfaProblem(grid); + mpfaProblem.setName("fvmpfaodiffusion"); + timer.reset(); + mpfaProblem.init(); + double mpfaTime = timer.elapsed(); + mpfaProblem.writeOutput(); + Dumux::ResultEvaluation mpfaResult; + mpfaResult.evaluate(grid.leafGridView(), mpfaProblem, consecutiveNumbering); + + using MimeticProblem = GetPropType<Properties::TTag::MimeticPressure2PTestTypeTag, Properties::Problem>; + MimeticProblem mimeticProblem(grid); + mimeticProblem.setName("mimeticdiffusion"); + timer.reset(); + mimeticProblem.init(); + double mimeticTime = timer.elapsed(); + mimeticProblem.writeOutput(); + Dumux::ResultEvaluation mimeticResult; + mimeticResult.evaluate(grid.leafGridView(), mimeticProblem, consecutiveNumbering); + + std::cout.setf(std::ios_base::scientific, std::ios_base::floatfield); + std::cout.precision(2); + std::cout << "\t error press \t error grad\t sumflux\t erflm\t\t uMin\t\t uMax\t\t time" << std::endl; + std::cout << "2pfa\t " << fvResult.relativeL2Error << "\t " << fvResult.ergrad << "\t " << fvResult.sumflux + << "\t " << fvResult.erflm << "\t " << fvResult.uMin + << "\t " << fvResult.uMax << "\t " << fvTime << std::endl; + std::cout << "mpfa-o\t " << mpfaResult.relativeL2Error << "\t " << mpfaResult.ergrad + << "\t " << mpfaResult.sumflux << "\t " << mpfaResult.erflm + << "\t " << mpfaResult.uMin << "\t " << mpfaResult.uMax << "\t " << mpfaTime << std::endl; + std::cout << "mimetic\t " << mimeticResult.relativeL2Error << "\t " << mimeticResult.ergrad + << "\t " << mimeticResult.sumflux << "\t " << mimeticResult.erflm + << "\t " << mimeticResult.uMin << "\t " << mimeticResult.uMax << "\t " << mimeticTime << std::endl; + + + + return 0; } diff --git a/test/porousmediumflow/1p/sequential/test_diffusion3d.cc b/test/porousmediumflow/1p/sequential/test_diffusion3d.cc index b2e5a26539227a9169850d33e1452b04eff17eaf..eda76e77799683b54ebad2c7cef2aa81e9936e32 100644 --- a/test/porousmediumflow/1p/sequential/test_diffusion3d.cc +++ b/test/porousmediumflow/1p/sequential/test_diffusion3d.cc @@ -243,29 +243,7 @@ void usage(const char *progName, const std::string &errorMsg) int main(int argc, char** argv) { - try { - return Dumux::start(argc, argv, usage); - } - catch (Dumux::ParameterException &e) { - std::cerr << std::endl << e << ". Abort!" << std::endl; - return 1; - } - catch (Dune::DGFException & e) { - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << std::endl; - return 2; - } - catch (Dune::Exception &e) { - std::cerr << "Dune reported error: " << e << std::endl; - return 3; - } - catch (...) { - std::cerr << "Unknown exception thrown!\n"; - return 4; - } + return Dumux::start(argc, argv, usage); } #else int main() diff --git a/test/porousmediumflow/1pnc/implicit/1p2c/isothermal/main.cc b/test/porousmediumflow/1pnc/implicit/1p2c/isothermal/main.cc index 2664ba957cc1100217bcf8fcc86d6ef35ace9eaa..540f7525aeef2e60740622fe6cafa83107d067f7 100644 --- a/test/porousmediumflow/1pnc/implicit/1p2c/isothermal/main.cc +++ b/test/porousmediumflow/1pnc/implicit/1p2c/isothermal/main.cc @@ -29,7 +29,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -49,7 +48,7 @@ #include "problem.hh" -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -168,28 +167,3 @@ int main(int argc, char** argv) try return 0; } - -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/1pnc/implicit/1p2c/isothermal/saltwaterintrusion/main.cc b/test/porousmediumflow/1pnc/implicit/1p2c/isothermal/saltwaterintrusion/main.cc index d3f834de139bdc611ed5e33dcdfc05912162d592..69c9f817c8b1f4632ecbf37e1af8e6864635adb9 100644 --- a/test/porousmediumflow/1pnc/implicit/1p2c/isothermal/saltwaterintrusion/main.cc +++ b/test/porousmediumflow/1pnc/implicit/1p2c/isothermal/saltwaterintrusion/main.cc @@ -28,7 +28,6 @@ #include <limits> #include <dune/common/parallel/mpihelper.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dumux/common/properties.hh> #include <dumux/common/parameters.hh> @@ -44,7 +43,7 @@ #include "problem.hh" -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -191,23 +190,3 @@ int main(int argc, char** argv) try return 0; } - -catch (const Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (const Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (const Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} diff --git a/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/conduction/main.cc b/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/conduction/main.cc index 50835dea1b56d386c196143d3e05d8830d001b71..4410a00d7892f9a7b3ace7f11375c8cc2f1d9b75 100644 --- a/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/conduction/main.cc +++ b/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/conduction/main.cc @@ -31,7 +31,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -49,7 +48,7 @@ #include <dumux/io/vtkoutputmodule.hh> #include <dumux/io/grid/gridmanager.hh> -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -178,27 +177,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/convection/main.cc b/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/convection/main.cc index 203a5a63fc09ea65b85d8041f53ff7f32a04fe1d..ef2cb22078c6d9471fcc5460388b455e061ac862 100644 --- a/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/convection/main.cc +++ b/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/convection/main.cc @@ -31,7 +31,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -49,7 +48,7 @@ #include <dumux/io/vtkoutputmodule.hh> #include <dumux/io/grid/gridmanager.hh> -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -178,27 +177,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/transientbc/main.cc b/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/transientbc/main.cc index 2f9d5764717e9dd13932f480c45ab8520511ecad..8f1f30997c609d75a63c345649c6f1e63b5a7633 100644 --- a/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/transientbc/main.cc +++ b/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/transientbc/main.cc @@ -31,7 +31,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -49,7 +48,7 @@ #include <dumux/io/vtkoutputmodule.hh> #include <dumux/io/grid/gridmanager.hh> -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -176,27 +175,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/1pnc/implicit/1p3c/main.cc b/test/porousmediumflow/1pnc/implicit/1p3c/main.cc index 1cee100c9ad7851eed75e520ca56bb420ebb1bab..8d6cf4242a92da27a85b72c0aeb7b0b55dbad755 100644 --- a/test/porousmediumflow/1pnc/implicit/1p3c/main.cc +++ b/test/porousmediumflow/1pnc/implicit/1p3c/main.cc @@ -29,7 +29,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -50,7 +49,7 @@ #include "problem.hh" -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -170,28 +169,3 @@ int main(int argc, char** argv) try return 0; } - -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/1pnc/implicit/nonequilibrium/main.cc b/test/porousmediumflow/1pnc/implicit/nonequilibrium/main.cc index d1d06385722e5f86fc3d3be79849df2a32184929..307fc933ecf20c8cae94e8fcfdff10b2f5dc898c 100644 --- a/test/porousmediumflow/1pnc/implicit/nonequilibrium/main.cc +++ b/test/porousmediumflow/1pnc/implicit/nonequilibrium/main.cc @@ -31,7 +31,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -49,7 +48,7 @@ #include <dumux/io/vtkoutputmodule.hh> #include <dumux/io/grid/gridmanager.hh> -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -174,27 +173,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/1pncmin/implicit/nonisothermal/main.cc b/test/porousmediumflow/1pncmin/implicit/nonisothermal/main.cc index 07157a6e5f00fd66ee729dba9bd6ed626f7edd2c..59c51f3f2d4e2b03667c33bd0aaf217a7fe34dbd 100644 --- a/test/porousmediumflow/1pncmin/implicit/nonisothermal/main.cc +++ b/test/porousmediumflow/1pncmin/implicit/nonisothermal/main.cc @@ -75,7 +75,7 @@ void usage(const char *progName, const std::string &errorMsg) } } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -203,27 +203,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/2p/implicit/adaptive/main.cc b/test/porousmediumflow/2p/implicit/adaptive/main.cc index 44512751dd6b98b8951df54778a2556f3e4ddb6a..bf92c55626731b6d272ffa947b5332aca801e0c6 100644 --- a/test/porousmediumflow/2p/implicit/adaptive/main.cc +++ b/test/porousmediumflow/2p/implicit/adaptive/main.cc @@ -29,7 +29,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -95,7 +94,7 @@ struct Problem<TypeTag, TTag::TwoPIncompressibleAdaptiveBox> { using type = TwoP } // end namespace Properties } // end namespace Dumux -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -279,27 +278,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/2p/implicit/boxdfm/main.cc b/test/porousmediumflow/2p/implicit/boxdfm/main.cc index 757cc50dad3631c986200cdd33643e1b7f79faee..6fe43aa027977f319432b4976beaafac3bc25248 100644 --- a/test/porousmediumflow/2p/implicit/boxdfm/main.cc +++ b/test/porousmediumflow/2p/implicit/boxdfm/main.cc @@ -79,7 +79,7 @@ void usage(const char *progName, const std::string &errorMsg) } } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -206,27 +206,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/2p/implicit/cornerpoint/main.cc b/test/porousmediumflow/2p/implicit/cornerpoint/main.cc index 556cccc733c976dfdeb76103605c1bd6d5ad46ee..912b99d799a8cd040a268f7a5bc74db806105a39 100644 --- a/test/porousmediumflow/2p/implicit/cornerpoint/main.cc +++ b/test/porousmediumflow/2p/implicit/cornerpoint/main.cc @@ -35,7 +35,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -89,7 +88,7 @@ void usage(const char *progName, const std::string &errorMsg) } } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -212,27 +211,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/2p/implicit/fracture/main.cc b/test/porousmediumflow/2p/implicit/fracture/main.cc index d0b46a8500511bec45f0ecc25e8536109fe7a0d6..65ee5f3c5bd0484a4edee32f3b05c50e0bfeb097 100644 --- a/test/porousmediumflow/2p/implicit/fracture/main.cc +++ b/test/porousmediumflow/2p/implicit/fracture/main.cc @@ -28,7 +28,6 @@ #include <iostream> #include <dune/common/parallel/mpihelper.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dumux/common/properties.hh> #include <dumux/common/parameters.hh> @@ -48,7 +47,7 @@ //////////////////////// // the main function //////////////////////// -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -192,22 +191,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (const Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (const Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (const Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} diff --git a/test/porousmediumflow/2p/implicit/incompressible/main.cc b/test/porousmediumflow/2p/implicit/incompressible/main.cc index 38bae0b6adfd6e6a7000c3315ba95b58f7424849..0d7c8192bb2941722fd22bf3ddc96ee22cb7bef9 100644 --- a/test/porousmediumflow/2p/implicit/incompressible/main.cc +++ b/test/porousmediumflow/2p/implicit/incompressible/main.cc @@ -29,7 +29,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -88,7 +87,7 @@ void usage(const char *progName, const std::string &errorMsg) } } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -229,27 +228,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/2p/implicit/nonisothermal/main.cc b/test/porousmediumflow/2p/implicit/nonisothermal/main.cc index 27c2bbb504965102dd22ced515e7b6694f3102ec..3ea0c65e18b51dc519a403bb7a7bc8af2b641fa3 100644 --- a/test/porousmediumflow/2p/implicit/nonisothermal/main.cc +++ b/test/porousmediumflow/2p/implicit/nonisothermal/main.cc @@ -28,7 +28,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk/vtksequencewriter.hh> #include <dune/istl/io.hh> @@ -75,7 +74,7 @@ void usage(const char *progName, const std::string &errorMsg) //////////////////////// // the main function //////////////////////// -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -200,28 +199,3 @@ int main(int argc, char** argv) try return 0; } - -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/2p/implicit/rotationsymmetry/main.cc b/test/porousmediumflow/2p/implicit/rotationsymmetry/main.cc index f0880978429829af9df3c8351eaceb79f9945576..9b56ad1e0d3b2291cb774a00513ff7062e043424 100644 --- a/test/porousmediumflow/2p/implicit/rotationsymmetry/main.cc +++ b/test/porousmediumflow/2p/implicit/rotationsymmetry/main.cc @@ -35,7 +35,7 @@ #include "properties.hh" -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -143,13 +143,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (const Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (const Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 2; -} diff --git a/test/porousmediumflow/2p/sequential/test_3d2p.cc b/test/porousmediumflow/2p/sequential/test_3d2p.cc index d4682f3078f9ed0a8a96ba1acb6973dab55a9c71..9ca39ee8d01a04dba59fff1dade7332448791ebb 100644 --- a/test/porousmediumflow/2p/sequential/test_3d2p.cc +++ b/test/porousmediumflow/2p/sequential/test_3d2p.cc @@ -67,82 +67,68 @@ int main(int argc, char** argv) { using namespace Dumux; - try { - Parameters::init(argc, argv, usage); + Parameters::init(argc, argv, usage); - const auto modelType = getParam<std::string>("ModelType", "MPFAL"); + const auto modelType = getParam<std::string>("ModelType", "MPFAL"); - if (modelType == "FV") - { - using ProblemTypeTag = Properties::TTag::FVTwoPTest; - std::cout<<"##########################################" << std::endl; - std::cout<<"Standard finite volume TPFA model" << std::endl; - std::cout<<"##########################################" << std::endl; - return start<ProblemTypeTag>(argc, argv, usage); - } - else if (modelType == "FVAdaptive") - { - using ProblemTypeTag = Properties::TTag::FVAdaptiveTwoPTest; - std::cout<<"##########################################" << std::endl; - std::cout<<"Adapative finite volume TPFA model" << std::endl; - std::cout<<"##########################################" << std::endl; - return start<ProblemTypeTag>(argc, argv, usage); - } - else if (modelType == "MPFAL") - { - using ProblemTypeTag = Properties::TTag::MPFALTwoPTest; - std::cout<<"##########################################" << std::endl; - std::cout<<"Standard finite volume MPFA-L model" << std::endl; - std::cout<<"##########################################" << std::endl; - return start<ProblemTypeTag>(argc, argv, usage); - } - else if (modelType == "MPFALAdaptive") - { - using ProblemTypeTag = Properties::TTag::MPFALAdaptiveTwoPTest; - std::cout<<"##########################################" << std::endl; - std::cout<<"Adapative finite volume MPFA-L model" << std::endl; - std::cout<<"##########################################" << std::endl; - return start<ProblemTypeTag>(argc, argv, usage); - } -#if PROBLEM != 1 - else if (modelType == "Mimetic") - { - using ProblemTypeTag = Properties::TTag::MimeticTwoPTest; - std::cout<<"##########################################" << std::endl; - std::cout<<"Standard mimetic finite difference model" << std::endl; - std::cout<<"##########################################" << std::endl; - return start<ProblemTypeTag>(argc, argv, usage); - } - else if (modelType == "MimeticAdaptive") - { - using ProblemTypeTag = Properties::TTag::MimeticAdaptiveTwoPTest; - std::cout<<"##########################################" << std::endl; - std::cout<<"Adaptive mimetic finite difference model" << std::endl; - std::cout<<"##########################################" << std::endl; - return start<ProblemTypeTag>(argc, argv, usage); - } -#endif - else - { - using ProblemTypeTag = Properties::TTag::MPFALTwoPTest; - std::cout<<"##########################################" << std::endl; - std::cout<<"Unknown model type " << modelType << ", default to" << std::endl; - std::cout<<"Standard finite volume MPFA-L model" << std::endl; - std::cout<<"##########################################" << std::endl; - return start<ProblemTypeTag>(argc, argv, usage); - } + if (modelType == "FV") + { + using ProblemTypeTag = Properties::TTag::FVTwoPTest; + std::cout<<"##########################################" << std::endl; + std::cout<<"Standard finite volume TPFA model" << std::endl; + std::cout<<"##########################################" << std::endl; + return start<ProblemTypeTag>(argc, argv, usage); + } + else if (modelType == "FVAdaptive") + { + using ProblemTypeTag = Properties::TTag::FVAdaptiveTwoPTest; + std::cout<<"##########################################" << std::endl; + std::cout<<"Adapative finite volume TPFA model" << std::endl; + std::cout<<"##########################################" << std::endl; + return start<ProblemTypeTag>(argc, argv, usage); + } + else if (modelType == "MPFAL") + { + using ProblemTypeTag = Properties::TTag::MPFALTwoPTest; + std::cout<<"##########################################" << std::endl; + std::cout<<"Standard finite volume MPFA-L model" << std::endl; + std::cout<<"##########################################" << std::endl; + return start<ProblemTypeTag>(argc, argv, usage); } - catch (ParameterException &e) { - std::cerr << std::endl << e << ". Abort!" << std::endl; - return 1; + else if (modelType == "MPFALAdaptive") + { + using ProblemTypeTag = Properties::TTag::MPFALAdaptiveTwoPTest; + std::cout<<"##########################################" << std::endl; + std::cout<<"Adapative finite volume MPFA-L model" << std::endl; + std::cout<<"##########################################" << std::endl; + return start<ProblemTypeTag>(argc, argv, usage); } - catch (Dune::Exception &e) { - std::cerr << "Dune reported error: " << e << std::endl; - return 3; +#if PROBLEM != 1 + else if (modelType == "Mimetic") + { + using ProblemTypeTag = Properties::TTag::MimeticTwoPTest; + std::cout<<"##########################################" << std::endl; + std::cout<<"Standard mimetic finite difference model" << std::endl; + std::cout<<"##########################################" << std::endl; + return start<ProblemTypeTag>(argc, argv, usage); } - catch (...) { - std::cerr << "Unknown exception thrown!\n"; - return 4; + else if (modelType == "MimeticAdaptive") + { + using ProblemTypeTag = Properties::TTag::MimeticAdaptiveTwoPTest; + std::cout<<"##########################################" << std::endl; + std::cout<<"Adaptive mimetic finite difference model" << std::endl; + std::cout<<"##########################################" << std::endl; + return start<ProblemTypeTag>(argc, argv, usage); + } +#endif + else + { + using ProblemTypeTag = Properties::TTag::MPFALTwoPTest; + std::cout<<"##########################################" << std::endl; + std::cout<<"Unknown model type " << modelType << ", default to" << std::endl; + std::cout<<"Standard finite volume MPFA-L model" << std::endl; + std::cout<<"##########################################" << std::endl; + return start<ProblemTypeTag>(argc, argv, usage); } return 0; diff --git a/test/porousmediumflow/2p/sequential/test_mpfa2p.cc b/test/porousmediumflow/2p/sequential/test_mpfa2p.cc index 1214706655963eb7b901214ddfe6b01b1afcb7cb..8b79a207fe89d6502e7e6ab38961ada2222cd042 100644 --- a/test/porousmediumflow/2p/sequential/test_mpfa2p.cc +++ b/test/porousmediumflow/2p/sequential/test_mpfa2p.cc @@ -58,73 +58,59 @@ int main(int argc, char** argv) { using namespace Dumux; - try { - Parameters::init(argc, argv, usage); + Parameters::init(argc, argv, usage); - const auto modelType = getParam<std::string>("ModelType", "MPFAL"); + const auto modelType = getParam<std::string>("ModelType", "MPFAL"); - if (modelType == "FV") - { - using ProblemTypeTag = Properties::TTag::FVTwoPTest; - std::cout<<"##########################################" << std::endl; - std::cout<<"Standard finite volume TPFA model" << std::endl; - std::cout<<"##########################################" << std::endl; - return start<ProblemTypeTag>(argc, argv, usage); - } - else if (modelType == "FVAdaptive") - { - using ProblemTypeTag = Properties::TTag::FVAdaptiveTwoPTest; - std::cout<<"##########################################" << std::endl; - std::cout<<"Adaptive finite volume TPFA model" << std::endl; - std::cout<<"##########################################" << std::endl; - return start<ProblemTypeTag>(argc, argv, usage); - } - else if (modelType == "MPFAO") - { - using ProblemTypeTag = Properties::TTag::MPFAOTwoPTest; - std::cout<<"##########################################" << std::endl; - std::cout<<"Standard finite volume MPFA-O model" << std::endl; - std::cout<<"##########################################" << std::endl; - return start<ProblemTypeTag>(argc, argv, usage); - } - else if (modelType == "MPFAL") - { - using ProblemTypeTag = Properties::TTag::MPFALTwoPTest; - std::cout<<"##########################################" << std::endl; - std::cout<<"Unknown model type " << modelType << ", default to" << std::endl; - std::cout<<"Standard finite volume MPFA-L model" << std::endl; - std::cout<<"##########################################" << std::endl; - return start<ProblemTypeTag>(argc, argv, usage); - } - else if (modelType == "MPFALAdaptive") - { - using ProblemTypeTag = Properties::TTag::MPFALAdaptiveTwoPTest; - std::cout<<"##########################################" << std::endl; - std::cout<<"Adaptive finite volume MPFA-L model" << std::endl; - std::cout<<"##########################################" << std::endl; - return start<ProblemTypeTag>(argc, argv, usage); - } - else - { - using ProblemTypeTag = Properties::TTag::MPFAOTwoPTest; - std::cout<<"##########################################" << std::endl; - std::cout<<"Unknown model type " << modelType << ", default to" << std::endl; - std::cout<<"Standard finite volume MPFA-O model" << std::endl; - std::cout<<"##########################################" << std::endl; - return start<ProblemTypeTag>(argc, argv, usage); - } + if (modelType == "FV") + { + using ProblemTypeTag = Properties::TTag::FVTwoPTest; + std::cout<<"##########################################" << std::endl; + std::cout<<"Standard finite volume TPFA model" << std::endl; + std::cout<<"##########################################" << std::endl; + return start<ProblemTypeTag>(argc, argv, usage); + } + else if (modelType == "FVAdaptive") + { + using ProblemTypeTag = Properties::TTag::FVAdaptiveTwoPTest; + std::cout<<"##########################################" << std::endl; + std::cout<<"Adaptive finite volume TPFA model" << std::endl; + std::cout<<"##########################################" << std::endl; + return start<ProblemTypeTag>(argc, argv, usage); + } + else if (modelType == "MPFAO") + { + using ProblemTypeTag = Properties::TTag::MPFAOTwoPTest; + std::cout<<"##########################################" << std::endl; + std::cout<<"Standard finite volume MPFA-O model" << std::endl; + std::cout<<"##########################################" << std::endl; + return start<ProblemTypeTag>(argc, argv, usage); } - catch (ParameterException &e) { - std::cerr << std::endl << e << ". Abort!" << std::endl; - return 1; + else if (modelType == "MPFAL") + { + using ProblemTypeTag = Properties::TTag::MPFALTwoPTest; + std::cout<<"##########################################" << std::endl; + std::cout<<"Unknown model type " << modelType << ", default to" << std::endl; + std::cout<<"Standard finite volume MPFA-L model" << std::endl; + std::cout<<"##########################################" << std::endl; + return start<ProblemTypeTag>(argc, argv, usage); } - catch (Dune::Exception &e) { - std::cerr << "Dune reported error: " << e << std::endl; - return 3; + else if (modelType == "MPFALAdaptive") + { + using ProblemTypeTag = Properties::TTag::MPFALAdaptiveTwoPTest; + std::cout<<"##########################################" << std::endl; + std::cout<<"Adaptive finite volume MPFA-L model" << std::endl; + std::cout<<"##########################################" << std::endl; + return start<ProblemTypeTag>(argc, argv, usage); } - catch (...) { - std::cerr << "Unknown exception thrown!\n"; - return 4; + else + { + using ProblemTypeTag = Properties::TTag::MPFAOTwoPTest; + std::cout<<"##########################################" << std::endl; + std::cout<<"Unknown model type " << modelType << ", default to" << std::endl; + std::cout<<"Standard finite volume MPFA-O model" << std::endl; + std::cout<<"##########################################" << std::endl; + return start<ProblemTypeTag>(argc, argv, usage); } return 0; diff --git a/test/porousmediumflow/2p1c/implicit/main.cc b/test/porousmediumflow/2p1c/implicit/main.cc index beb0ebb083499daf805d49e0acc0ad827b7f8cf3..18e51454b17f32b150fb281ff2293f17114a2f73 100644 --- a/test/porousmediumflow/2p1c/implicit/main.cc +++ b/test/porousmediumflow/2p1c/implicit/main.cc @@ -31,7 +31,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -49,7 +48,7 @@ #include <dumux/io/vtkoutputmodule.hh> #include <dumux/io/grid/gridmanager.hh> -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -168,27 +167,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/2p2c/implicit/chemicalnonequilibrium/main.cc b/test/porousmediumflow/2p2c/implicit/chemicalnonequilibrium/main.cc index 3d4ffbcc4b82a3fc319c8aa4381427f441f1833a..e045c8895dbc48a1e105545346d28f76a0a5039f 100644 --- a/test/porousmediumflow/2p2c/implicit/chemicalnonequilibrium/main.cc +++ b/test/porousmediumflow/2p2c/implicit/chemicalnonequilibrium/main.cc @@ -28,7 +28,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk/vtksequencewriter.hh> #include <dune/istl/io.hh> @@ -77,7 +76,7 @@ void usage(const char *progName, const std::string &errorMsg) //////////////////////// // the main function //////////////////////// -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -203,28 +202,3 @@ int main(int argc, char** argv) try return 0; } - -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/2p2c/implicit/injection/main.cc b/test/porousmediumflow/2p2c/implicit/injection/main.cc index 9fb9c38c7e157e2947aae8902c567620fa3a8b8c..87b37d004a528e7b339ee61335e7c99c4977855c 100644 --- a/test/porousmediumflow/2p2c/implicit/injection/main.cc +++ b/test/porousmediumflow/2p2c/implicit/injection/main.cc @@ -27,7 +27,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -51,7 +50,7 @@ // the problem definitions #include "problem.hh" -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -182,27 +181,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/2p2c/implicit/mpnccomparison/main.cc b/test/porousmediumflow/2p2c/implicit/mpnccomparison/main.cc index 1ad16cdbb63fc6de06ea63a52a6e0213ff8de255..74703c0220d6f2095fbd9cb8e846163a5ad10581 100644 --- a/test/porousmediumflow/2p2c/implicit/mpnccomparison/main.cc +++ b/test/porousmediumflow/2p2c/implicit/mpnccomparison/main.cc @@ -28,7 +28,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk/vtksequencewriter.hh> #include <dune/istl/io.hh> @@ -77,7 +76,7 @@ void usage(const char *progName, const std::string &errorMsg) //////////////////////// // the main function //////////////////////// -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -194,28 +193,3 @@ int main(int argc, char** argv) try return 0; } - -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/2p2c/implicit/waterair/main.cc b/test/porousmediumflow/2p2c/implicit/waterair/main.cc index d06395e63f89f363faf3941aed79e3b043a8a1d9..e58832f747be9d5dffc2618444e6a8aa79819d25 100644 --- a/test/porousmediumflow/2p2c/implicit/waterair/main.cc +++ b/test/porousmediumflow/2p2c/implicit/waterair/main.cc @@ -45,7 +45,7 @@ // the problem definitions #include "problem.hh" -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -160,27 +160,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (const Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (const Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (const Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/2p2c/sequential/test_multiphysics2p2c.cc b/test/porousmediumflow/2p2c/sequential/test_multiphysics2p2c.cc index e856f339b00fd882c7cea0fb8bf996cc4fcd48e0..76a140334890e2418923c0a5848a2705602f9101 100644 --- a/test/porousmediumflow/2p2c/sequential/test_multiphysics2p2c.cc +++ b/test/porousmediumflow/2p2c/sequential/test_multiphysics2p2c.cc @@ -47,80 +47,69 @@ int main(int argc, char** argv) { using namespace Dumux; - try { - using TypeTag = Properties::TTag::TestMultTwoPTwoC; - using Grid = GetPropType<TypeTag, Properties::Grid>; - using Problem = GetPropType<TypeTag, Properties::Problem>; - using TimeManager = GetPropType<TypeTag, Properties::TimeManager>; + using TypeTag = Properties::TTag::TestMultTwoPTwoC; + using Grid = GetPropType<TypeTag, Properties::Grid>; + using Problem = GetPropType<TypeTag, Properties::Problem>; + using TimeManager = GetPropType<TypeTag, Properties::TimeManager>; - static const int dim = Grid::dimension; + static const int dim = Grid::dimension; - // initialize MPI, finalize is done automatically on exit - Dune::MPIHelper::instance(argc, argv); + // initialize MPI, finalize is done automatically on exit + Dune::MPIHelper::instance(argc, argv); - auto defaultParams = [] (Dune::ParameterTree& p) {GetProp<TypeTag, Properties::ModelDefaultParameters>::defaultParams(p);}; - Dumux::Parameters::init(argc, argv, defaultParams, usage); + auto defaultParams = [] (Dune::ParameterTree& p) {GetProp<TypeTag, Properties::ModelDefaultParameters>::defaultParams(p);}; + Dumux::Parameters::init(argc, argv, defaultParams, usage); - //////////////////////////////////////////////////////////// - // parse the command line arguments - //////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////// + // parse the command line arguments + //////////////////////////////////////////////////////////// + // deal with the restart stuff + int argPos = 1; + bool restart = false; + double startTime = 0; + // deal with start parameters + double tEnd= 3e3; + double firstDt = 200; + if (argc != 1) + { // deal with the restart stuff - int argPos = 1; - bool restart = false; - double startTime = 0; - // deal with start parameters - double tEnd= 3e3; - double firstDt = 200; - if (argc != 1) - { - // deal with the restart stuff - if (std::string("--restart") == argv[argPos]) { - restart = true; - ++argPos; + if (std::string("--restart") == argv[argPos]) { + restart = true; + ++argPos; - std::istringstream(argv[argPos++]) >> startTime; - } - if (argc - argPos == 2) - { - // read the initial time step and the end time - std::istringstream(argv[argPos++]) >> tEnd; - std::istringstream(argv[argPos++]) >> firstDt; - } - else - usage(argv[0]); + std::istringstream(argv[argPos++]) >> startTime; } - else + if (argc - argPos == 2) { - Dune::dwarn << "simulation started with predefs" << std::endl; + // read the initial time step and the end time + std::istringstream(argv[argPos++]) >> tEnd; + std::istringstream(argv[argPos++]) >> firstDt; } - - //////////////////////////////////////////////////////////// - // create the grid - //////////////////////////////////////////////////////////// - std::array<int,dim> N; - std::fill(N.begin(), N.end(), 10); - Dune::FieldVector<double,dim> H(10.0); - Grid grid(H, N); - - //////////////////////////////////////////////////////////// - // instantiate and run the concrete problem - //////////////////////////////////////////////////////////// - TimeManager timeManager; - Problem problem(timeManager, grid, H); - - // initialize the simulation - timeManager.init(problem, startTime, firstDt, tEnd, restart); - // run the simulation - timeManager.run(); - return 0; - } - catch (Dune::Exception &e) { - std::cerr << "Dune reported error: " << e << std::endl; + else + usage(argv[0]); } - catch (...) { - std::cerr << "Unknown exception thrown!\n"; - throw; + else + { + Dune::dwarn << "simulation started with predefs" << std::endl; } - return 3; + //////////////////////////////////////////////////////////// + // create the grid + //////////////////////////////////////////////////////////// + std::array<int,dim> N; + std::fill(N.begin(), N.end(), 10); + Dune::FieldVector<double,dim> H(10.0); + Grid grid(H, N); + + //////////////////////////////////////////////////////////// + // instantiate and run the concrete problem + //////////////////////////////////////////////////////////// + TimeManager timeManager; + Problem problem(timeManager, grid, H); + + // initialize the simulation + timeManager.init(problem, startTime, firstDt, tEnd, restart); + // run the simulation + timeManager.run(); + return 0; } diff --git a/test/porousmediumflow/2pnc/implicit/diffusion/main.cc b/test/porousmediumflow/2pnc/implicit/diffusion/main.cc index 6b73087e2a8bff69403fb55cb897a1eefe81d02c..1eac73b2de51c3c6cbb66fcea5602037b5c0603d 100644 --- a/test/porousmediumflow/2pnc/implicit/diffusion/main.cc +++ b/test/porousmediumflow/2pnc/implicit/diffusion/main.cc @@ -28,7 +28,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -73,7 +72,7 @@ void usage(const char *progName, const std::string &errorMsg) } } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -190,27 +189,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/2pnc/implicit/fuelcell/main.cc b/test/porousmediumflow/2pnc/implicit/fuelcell/main.cc index d7655ebd7315165657d7e2ac171f21320034ea25..5dc0aba8a0f0d67fce52f96bac39335244978413 100644 --- a/test/porousmediumflow/2pnc/implicit/fuelcell/main.cc +++ b/test/porousmediumflow/2pnc/implicit/fuelcell/main.cc @@ -28,7 +28,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -73,7 +72,7 @@ void usage(const char *progName, const std::string &errorMsg) } } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -194,27 +193,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/2pncmin/implicit/isothermal/main.cc b/test/porousmediumflow/2pncmin/implicit/isothermal/main.cc index fa31e1e6b91685319bde29ddfb173ea291518097..7424d619b111d8e652935f45b4927c13937fdc20 100644 --- a/test/porousmediumflow/2pncmin/implicit/isothermal/main.cc +++ b/test/porousmediumflow/2pncmin/implicit/isothermal/main.cc @@ -28,7 +28,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -74,7 +73,7 @@ void usage(const char *progName, const std::string &errorMsg) } } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -217,27 +216,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/2pncmin/implicit/nonisothermal/main.cc b/test/porousmediumflow/2pncmin/implicit/nonisothermal/main.cc index c4452b6e7c4650be443f7119c3741123f415aeef..33dd43a49215de1a59c1109a95ac83383a2d3423 100644 --- a/test/porousmediumflow/2pncmin/implicit/nonisothermal/main.cc +++ b/test/porousmediumflow/2pncmin/implicit/nonisothermal/main.cc @@ -28,7 +28,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -75,7 +74,7 @@ void usage(const char *progName, const std::string &errorMsg) } } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -218,27 +217,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/3p/implicit/conduction/main.cc b/test/porousmediumflow/3p/implicit/conduction/main.cc index 0178e59dbf97876744babaa980af25a603e68960..61312211215d3a2a14776484fa577d5bf58f2407 100644 --- a/test/porousmediumflow/3p/implicit/conduction/main.cc +++ b/test/porousmediumflow/3p/implicit/conduction/main.cc @@ -28,7 +28,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -80,7 +79,7 @@ void usage(const char *progName, const std::string &errorMsg) } } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -203,27 +202,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/3p/implicit/convection/main.cc b/test/porousmediumflow/3p/implicit/convection/main.cc index 06edc34d7249e2ac3714ecf28550690e8eb13669..87ad24cecf88f17d0e20dbd9d63f433ee249150d 100644 --- a/test/porousmediumflow/3p/implicit/convection/main.cc +++ b/test/porousmediumflow/3p/implicit/convection/main.cc @@ -28,7 +28,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -80,7 +79,7 @@ void usage(const char *progName, const std::string &errorMsg) } } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -204,27 +203,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/3p/implicit/infiltration/main.cc b/test/porousmediumflow/3p/implicit/infiltration/main.cc index 491544c345c96046f21732f02263a1d0483f1c4a..5f0ad940f6250449e6bd25cdb505120e6c31bc94 100644 --- a/test/porousmediumflow/3p/implicit/infiltration/main.cc +++ b/test/porousmediumflow/3p/implicit/infiltration/main.cc @@ -28,7 +28,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -80,7 +79,7 @@ void usage(const char *progName, const std::string &errorMsg) } } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -201,27 +200,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/3p3c/implicit/columnxylol/main.cc b/test/porousmediumflow/3p3c/implicit/columnxylol/main.cc index 87c966bc8966835523d44fd081122f8194423daf..ae2ce88c78b0ee7bc5cadf542f72fbbedb6e595d 100644 --- a/test/porousmediumflow/3p3c/implicit/columnxylol/main.cc +++ b/test/porousmediumflow/3p3c/implicit/columnxylol/main.cc @@ -27,7 +27,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dumux/common/properties.hh> @@ -75,7 +74,7 @@ void usage(const char *progName, const std::string &errorMsg) } } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -200,27 +199,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/3p3c/implicit/infiltration/main.cc b/test/porousmediumflow/3p3c/implicit/infiltration/main.cc index 87c966bc8966835523d44fd081122f8194423daf..ae2ce88c78b0ee7bc5cadf542f72fbbedb6e595d 100644 --- a/test/porousmediumflow/3p3c/implicit/infiltration/main.cc +++ b/test/porousmediumflow/3p3c/implicit/infiltration/main.cc @@ -27,7 +27,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dumux/common/properties.hh> @@ -75,7 +74,7 @@ void usage(const char *progName, const std::string &errorMsg) } } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -200,27 +199,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/3p3c/implicit/kuevette/main.cc b/test/porousmediumflow/3p3c/implicit/kuevette/main.cc index 87c966bc8966835523d44fd081122f8194423daf..ae2ce88c78b0ee7bc5cadf542f72fbbedb6e595d 100644 --- a/test/porousmediumflow/3p3c/implicit/kuevette/main.cc +++ b/test/porousmediumflow/3p3c/implicit/kuevette/main.cc @@ -27,7 +27,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dumux/common/properties.hh> @@ -75,7 +74,7 @@ void usage(const char *progName, const std::string &errorMsg) } } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -200,27 +199,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/3pwateroil/implicit/main.cc b/test/porousmediumflow/3pwateroil/implicit/main.cc index ebfc92dbfd9b72df2bd29007980adcc10b0e3d5e..b00be17e4df833ba24d440e5ebc5963cf2e5368d 100644 --- a/test/porousmediumflow/3pwateroil/implicit/main.cc +++ b/test/porousmediumflow/3pwateroil/implicit/main.cc @@ -27,7 +27,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dumux/common/properties.hh> @@ -75,7 +74,7 @@ void usage(const char *progName, const std::string &errorMsg) } } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -199,27 +198,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/co2/implicit/main.cc b/test/porousmediumflow/co2/implicit/main.cc index 37b9d7d28e3fc93fad7820ff53b1839184322382..b65ee0c03dceb2564acbe531198eb8f38ed3dc93 100644 --- a/test/porousmediumflow/co2/implicit/main.cc +++ b/test/porousmediumflow/co2/implicit/main.cc @@ -27,7 +27,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -50,7 +49,7 @@ // the problem definitions #include "problem.hh" -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -172,27 +171,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/mpnc/implicit/2p2ccomparison/main.cc b/test/porousmediumflow/mpnc/implicit/2p2ccomparison/main.cc index 92f91285c62f6d6a783d2ded9444727a35a25f64..09e8067693a6eb4fe28ab6c06b45c04c21267b73 100644 --- a/test/porousmediumflow/mpnc/implicit/2p2ccomparison/main.cc +++ b/test/porousmediumflow/mpnc/implicit/2p2ccomparison/main.cc @@ -28,7 +28,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -82,7 +81,7 @@ void usage(const char *progName, const std::string &errorMsg) } } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -199,27 +198,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/mpnc/implicit/kinetic/main.cc b/test/porousmediumflow/mpnc/implicit/kinetic/main.cc index e816ec9f8d941e9eddd834f39524c3d7098d1bc5..bcd56dceaec7908a5c13aba3bdb9001a90f633b5 100644 --- a/test/porousmediumflow/mpnc/implicit/kinetic/main.cc +++ b/test/porousmediumflow/mpnc/implicit/kinetic/main.cc @@ -29,7 +29,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -75,7 +74,7 @@ void usage(const char *progName, const std::string &errorMsg) } } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -200,27 +199,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/mpnc/implicit/obstacle/main.cc b/test/porousmediumflow/mpnc/implicit/obstacle/main.cc index 92f91285c62f6d6a783d2ded9444727a35a25f64..09e8067693a6eb4fe28ab6c06b45c04c21267b73 100644 --- a/test/porousmediumflow/mpnc/implicit/obstacle/main.cc +++ b/test/porousmediumflow/mpnc/implicit/obstacle/main.cc @@ -28,7 +28,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -82,7 +81,7 @@ void usage(const char *progName, const std::string &errorMsg) } } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -199,27 +198,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/mpnc/implicit/thermalnonequilibrium/main.cc b/test/porousmediumflow/mpnc/implicit/thermalnonequilibrium/main.cc index 062e3f1c5b240e958e0bf831414c0f42d9999b22..9685987600c644aa4d54efecce16cc39f323cd1f 100644 --- a/test/porousmediumflow/mpnc/implicit/thermalnonequilibrium/main.cc +++ b/test/porousmediumflow/mpnc/implicit/thermalnonequilibrium/main.cc @@ -29,7 +29,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -75,7 +74,7 @@ void usage(const char *progName, const std::string &errorMsg) } } -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -200,27 +199,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/richards/implicit/analytical/main.cc b/test/porousmediumflow/richards/implicit/analytical/main.cc index 951d959a9815ff805c57021062485e926ba712ff..234f99b9d9facf210da7b1af6a59d8295336ad92 100644 --- a/test/porousmediumflow/richards/implicit/analytical/main.cc +++ b/test/porousmediumflow/richards/implicit/analytical/main.cc @@ -31,7 +31,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -75,7 +74,7 @@ void usage(const char *progName, const std::string &errorMsg) //////////////////////// // the main function //////////////////////// -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -197,28 +196,3 @@ int main(int argc, char** argv) try return 0; } - -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/richards/implicit/lens/main.cc b/test/porousmediumflow/richards/implicit/lens/main.cc index 781509124a3ea158f126f52444987b4949e06094..f58d731226372e2a178b0490b5638ff234ae8009 100644 --- a/test/porousmediumflow/richards/implicit/lens/main.cc +++ b/test/porousmediumflow/richards/implicit/lens/main.cc @@ -30,7 +30,6 @@ #include <dune/common/version.hh> #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -62,7 +61,7 @@ //////////////////////// // the main function //////////////////////// -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -203,28 +202,3 @@ int main(int argc, char** argv) try return 0; } - -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/richards/implicit/nonisothermal/conduction/main.cc b/test/porousmediumflow/richards/implicit/nonisothermal/conduction/main.cc index 81471166663f227caa844cec095104589e88368c..15c6631842d7370c2d6b91436c809caaf8c517ef 100644 --- a/test/porousmediumflow/richards/implicit/nonisothermal/conduction/main.cc +++ b/test/porousmediumflow/richards/implicit/nonisothermal/conduction/main.cc @@ -31,7 +31,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -75,7 +74,7 @@ void usage(const char *progName, const std::string &errorMsg) //////////////////////// // the main function //////////////////////// -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -196,28 +195,3 @@ int main(int argc, char** argv) try return 0; } - -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/richards/implicit/nonisothermal/convection/main.cc b/test/porousmediumflow/richards/implicit/nonisothermal/convection/main.cc index 81471166663f227caa844cec095104589e88368c..15c6631842d7370c2d6b91436c809caaf8c517ef 100644 --- a/test/porousmediumflow/richards/implicit/nonisothermal/convection/main.cc +++ b/test/porousmediumflow/richards/implicit/nonisothermal/convection/main.cc @@ -31,7 +31,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -75,7 +74,7 @@ void usage(const char *progName, const std::string &errorMsg) //////////////////////// // the main function //////////////////////// -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -196,28 +195,3 @@ int main(int argc, char** argv) try return 0; } - -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/richards/implicit/nonisothermal/evaporation/main.cc b/test/porousmediumflow/richards/implicit/nonisothermal/evaporation/main.cc index 7fa13f7e18ceec73634451e35f03380560ca511f..f11bf909c3039a348d7027cf420960160fef3d54 100644 --- a/test/porousmediumflow/richards/implicit/nonisothermal/evaporation/main.cc +++ b/test/porousmediumflow/richards/implicit/nonisothermal/evaporation/main.cc @@ -31,7 +31,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -50,7 +49,7 @@ //////////////////////// // the main function //////////////////////// -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -167,28 +166,3 @@ int main(int argc, char** argv) try return 0; } - -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/richardsnc/implicit/main.cc b/test/porousmediumflow/richardsnc/implicit/main.cc index 0d0d94c8f77ecf47753d30c1e2ae4b53e8ce3abc..b2ae15ca22331d9dc7400b050402105852fca57f 100644 --- a/test/porousmediumflow/richardsnc/implicit/main.cc +++ b/test/porousmediumflow/richardsnc/implicit/main.cc @@ -31,7 +31,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -75,7 +74,7 @@ void usage(const char *progName, const std::string &errorMsg) //////////////////////// // the main function //////////////////////// -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -194,28 +193,3 @@ int main(int argc, char** argv) try return 0; } - -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/solidenergy/main.cc b/test/porousmediumflow/solidenergy/main.cc index f210a5903c22d61d7b460fdcdd2918bfe96840fc..5d2e8c7be3704a0afe6258c4223117e0d7e9430e 100644 --- a/test/porousmediumflow/solidenergy/main.cc +++ b/test/porousmediumflow/solidenergy/main.cc @@ -79,7 +79,7 @@ struct SpatialParams<TypeTag, TTag::SolidEnergyTest> } // end namespace Properties } // end namespace Dumux -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -200,27 +200,3 @@ int main(int argc, char** argv) try return 0; } // end main -catch (const Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (const Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (const Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/tracer/2ptracer/main.cc b/test/porousmediumflow/tracer/2ptracer/main.cc index 9b3fafee2656fa54b911ffe429c2d71556485775..053f2d4699682ffec644338b2681fdb581893182 100644 --- a/test/porousmediumflow/tracer/2ptracer/main.cc +++ b/test/porousmediumflow/tracer/2ptracer/main.cc @@ -28,7 +28,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk.hh> #include <test/porousmediumflow/2p/implicit/incompressible/problem.hh> @@ -51,7 +50,7 @@ #include <dumux/io/vtkoutputmodule.hh> #include <dumux/io/grid/gridmanager.hh> -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -332,28 +331,3 @@ int main(int argc, char** argv) try return 0; } // end main - -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/tracer/constvel/main.cc b/test/porousmediumflow/tracer/constvel/main.cc index e6aaa863dc7008e9cef8c19161bab5e3663b2205..ee423251b2be1afd26b48f93e196cd2fe7612022 100644 --- a/test/porousmediumflow/tracer/constvel/main.cc +++ b/test/porousmediumflow/tracer/constvel/main.cc @@ -28,7 +28,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk/vtksequencewriter.hh> #include <dumux/common/properties.hh> @@ -43,7 +42,7 @@ #include "problem.hh" -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -192,27 +191,3 @@ int main(int argc, char** argv) try return 0; } -catch (Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -} diff --git a/test/porousmediumflow/tracer/multiphase/main.cc b/test/porousmediumflow/tracer/multiphase/main.cc index a797ee6f6a6cb9567f5c0ce55fdf53f15fc35e64..41afd566457a2588c5fbec13d690770a1a0f494e 100644 --- a/test/porousmediumflow/tracer/multiphase/main.cc +++ b/test/porousmediumflow/tracer/multiphase/main.cc @@ -28,7 +28,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/dgfparser/dgfexception.hh> #include <dune/grid/io/file/vtk/vtksequencewriter.hh> #include <dumux/common/properties.hh> @@ -45,7 +44,7 @@ #include "properties.hh" -int main(int argc, char** argv) try +int main(int argc, char** argv) { using namespace Dumux; @@ -166,27 +165,3 @@ int main(int argc, char** argv) try return 0; } -catch (const Dumux::ParameterException &e) -{ - std::cerr << std::endl << e << " ---> Abort!" << std::endl; - return 1; -} -catch (const Dune::DGFException & e) -{ - std::cerr << "DGF exception thrown (" << e << - "). Most likely, the DGF file name is wrong " - "or the DGF file is corrupted, " - "e.g. missing hash at end of file or wrong number (dimensions) of entries." - << " ---> Abort!" << std::endl; - return 2; -} -catch (const Dune::Exception &e) -{ - std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; - return 3; -} -catch (...) -{ - std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; - return 4; -}