From 819b6c39cf558600bf1072a949a41a992e95af41 Mon Sep 17 00:00:00 2001 From: Mathis Kelm <mathis.kelm@iws.uni-stuttgart.de> Date: Wed, 30 Sep 2020 13:10:43 +0200 Subject: [PATCH] [cleanup][test] Remove try/catch exception handling from all tests --- test/common/functions/test_function_l2norm.cc | 9 +- test/common/integrate/test_integratescalar.cc | 7 +- test/common/math/test_math.cc | 6 +- .../parameters/test_loggingparametertree.cc | 21 +-- .../propertysystem/test_propertysystem.cc | 15 +- test/common/test_partial.cc | 12 +- test/common/timeloop/test_timeloop.cc | 9 +- test/discretization/box/test_boxfvgeometry.cc | 10 +- .../cellcentered/tpfa/test_tpfafvgeometry.cc | 10 +- .../tpfa/test_tpfafvgeometry_nonconforming.cc | 10 +- .../projection/test_projection_2d1d.cc | 10 +- .../test_rotationsymmetric_gridgeometry.cc | 10 +- .../test_staggered_free_flow_geometry.cc | 10 +- .../staggered/test_staggeredfvgeometry.cc | 10 +- test/flux/test_diffusioncontainers.cc | 7 +- test/freeflow/navierstokes/angeli/main.cc | 27 +--- test/freeflow/navierstokes/channel/1d/main.cc | 27 +--- test/freeflow/navierstokes/channel/2d/main.cc | 27 +--- test/freeflow/navierstokes/channel/3d/main.cc | 27 +--- .../navierstokes/channel/pipe/main.cc | 21 +-- .../navierstokes/closedsystem/main.cc | 27 +--- test/freeflow/navierstokes/donea/main.cc | 27 +--- test/freeflow/navierstokes/kovasznay/main.cc | 27 +--- test/freeflow/navierstokes/sincos/main.cc | 27 +--- test/freeflow/navierstokesnc/channel/main.cc | 27 +--- .../navierstokesnc/densitydrivenflow/main.cc | 27 +--- .../navierstokesnc/maxwellstefan/main.cc | 27 +--- test/freeflow/rans/main.cc | 27 +--- test/freeflow/ransnc/main.cc | 27 +--- test/freeflow/shallowwater/bowl/main.cc | 14 +- test/freeflow/shallowwater/dambreak/main.cc | 28 +--- .../shallowwater/roughchannel/main.cc | 28 +--- test/geomechanics/elastic/main.cc | 27 +--- test/geomechanics/poroelastic/main.cc | 27 +--- .../geometry/boundingboxtree/test_bboxtree.cc | 13 +- .../boundingboxtree/test_geometry_fracture.cc | 9 +- test/geometry/test_0d1d_intersection.cc | 9 +- test/geometry/test_0d2d_intersection.cc | 9 +- test/geometry/test_0d3d_intersection.cc | 9 +- test/geometry/test_1d1d_intersection.cc | 9 +- test/geometry/test_1d2d_intersection.cc | 9 +- test/geometry/test_1d3d_intersection.cc | 9 +- test/geometry/test_2d2d_intersection.cc | 9 +- test/geometry/test_2d3d_intersection.cc | 9 +- test/geometry/test_distance.cc | 9 +- test/geometry/test_graham_convex_hull.cc | 9 +- test/geometry/test_intersectionentityset.cc | 9 +- test/geometry/test_makegeometry.cc | 9 +- .../geometry/test_refinementquadraturerule.cc | 9 +- test/io/gridmanager/test_gmshboundaryflag.cc | 10 +- test/io/gridmanager/test_gridmanager_cake.cc | 14 +- test/io/gridmanager/test_gridmanager_dgf.cc | 10 +- .../gridmanager/test_gridmanager_gmsh_3d.cc | 14 +- .../test_gridmanager_gmsh_e_markers.cc | 10 +- test/io/gridmanager/test_gridmanager_mmesh.cc | 17 +- .../gridmanager/test_gridmanager_subgrid.cc | 17 +- test/io/gridmanager/test_gridmanager_vtk.cc | 10 +- .../vtk/test_vtk_staggeredfreeflowpvnames.cc | 17 +- test/io/vtk/test_vtkoutputmodule.cc | 12 +- test/io/vtk/test_vtkreader.cc | 10 +- test/linear/test_linearsolver.cc | 7 +- .../2p/test_material_2p_brookscorey.cc | 8 +- .../2p/test_material_2p_vangenuchten.cc | 8 +- .../solidsystems/test_solidsystems.cc | 13 +- .../boundary/darcydarcy/1p_1p/main.cc | 28 +--- .../boundary/darcydarcy/1p_2p/main.cc | 28 +--- .../1p2c_1p2c/diffusionlawcomparison/main.cc | 26 +--- .../boundary/stokesdarcy/1p2c_1p2c/main.cc | 26 +--- .../boundary/stokesdarcy/1p2c_2p2c/main.cc | 26 +--- .../boundary/stokesdarcy/1p3c_1p3c/main.cc | 26 +--- .../stokesdarcy/1p_1p/convergencetest/main.cc | 26 +--- .../boundary/stokesdarcy/1p_1p/main.cc | 26 +--- .../boundary/stokesdarcy/1p_2p/main.cc | 26 +--- .../embedded/1d3d/1p2c_richards2c/main.cc | 26 +--- test/multidomain/embedded/1d3d/1p_1p/main.cc | 26 +--- .../embedded/1d3d/1p_richards/main.cc | 26 +--- test/multidomain/embedded/2d3d/1p_1p/main.cc | 26 +--- .../facet/1p_1p/analytical/main.cc | 26 +--- test/multidomain/facet/1p_1p/gravity/main.cc | 26 +--- .../facet/1p_1p/linearprofile/main.cc | 26 +--- .../facet/1p_1p/threedomain/main.cc | 26 +--- test/multidomain/facet/1pnc_1pnc/main.cc | 26 +--- .../facet/test_facetcouplingmapper.cc | 13 +- .../test_facetcouplingmapper_boundary.cc | 13 +- test/multidomain/facet/test_gridmanager.cc | 9 +- test/multidomain/facet/test_vertexmapper.cc | 15 +- test/multidomain/facet/tracer_tracer/main.cc | 26 +--- test/multidomain/poromechanics/el1p/main.cc | 26 +--- test/multidomain/poromechanics/el2p/main.cc | 26 +--- .../findscalarroot/test_findscalarroot.cc | 12 +- test/nonlinear/newton/test_newton.cc | 12 +- .../compressible/instationary/main.cc | 27 +--- .../implicit/compressible/stationary/main.cc | 27 +--- .../convergence/analyticsolution/main.cc | 22 +-- .../convergence/discretesolution/main.cc | 26 +--- .../convergence/discretesolution/solver.hh | 1 - .../1p/implicit/fracture2d3d/main.cc | 27 +--- .../1p/implicit/incompressible/main.cc | 27 +--- .../1p/implicit/isothermal/main.cc | 27 +--- .../1p/implicit/network1d3d/main.cc | 27 +--- .../1p/implicit/nonisothermal/main.cc | 27 +--- .../1p/implicit/periodicbc/main.cc | 27 +--- .../pointsources/timedependent/main.cc | 27 +--- .../pointsources/timeindependent/main.cc | 27 +--- .../1p/sequential/test_diffusion.cc | 147 ++++++++---------- .../1p/sequential/test_diffusion3d.cc | 24 +-- .../1pnc/implicit/1p2c/isothermal/main.cc | 28 +--- .../isothermal/saltwaterintrusion/main.cc | 23 +-- .../1p2c/nonisothermal/conduction/main.cc | 27 +--- .../1p2c/nonisothermal/convection/main.cc | 27 +--- .../1p2c/nonisothermal/transientbc/main.cc | 27 +--- .../1pnc/implicit/1p3c/main.cc | 28 +--- .../1pnc/implicit/nonequilibrium/main.cc | 27 +--- .../1pncmin/implicit/nonisothermal/main.cc | 26 +--- .../2p/implicit/adaptive/main.cc | 27 +--- .../2p/implicit/boxdfm/main.cc | 26 +--- .../2p/implicit/cornerpoint/main.cc | 27 +--- .../2p/implicit/fracture/main.cc | 22 +-- .../2p/implicit/incompressible/main.cc | 27 +--- .../2p/implicit/nonisothermal/main.cc | 28 +--- .../2p/implicit/rotationsymmetry/main.cc | 12 +- .../2p/sequential/test_3d2p.cc | 128 +++++++-------- .../2p/sequential/test_mpfa2p.cc | 110 ++++++------- test/porousmediumflow/2p1c/implicit/main.cc | 27 +--- .../implicit/chemicalnonequilibrium/main.cc | 28 +--- .../2p2c/implicit/injection/main.cc | 27 +--- .../2p2c/implicit/mpnccomparison/main.cc | 28 +--- .../2p2c/implicit/waterair/main.cc | 26 +--- .../2p2c/sequential/test_multiphysics2p2c.cc | 117 +++++++------- .../2pnc/implicit/diffusion/main.cc | 27 +--- .../2pnc/implicit/fuelcell/main.cc | 27 +--- .../2pncmin/implicit/isothermal/main.cc | 27 +--- .../2pncmin/implicit/nonisothermal/main.cc | 27 +--- .../3p/implicit/conduction/main.cc | 27 +--- .../3p/implicit/convection/main.cc | 27 +--- .../3p/implicit/infiltration/main.cc | 27 +--- .../3p3c/implicit/columnxylol/main.cc | 27 +--- .../3p3c/implicit/infiltration/main.cc | 27 +--- .../3p3c/implicit/kuevette/main.cc | 27 +--- .../3pwateroil/implicit/main.cc | 27 +--- test/porousmediumflow/co2/implicit/main.cc | 27 +--- .../mpnc/implicit/2p2ccomparison/main.cc | 27 +--- .../mpnc/implicit/kinetic/main.cc | 27 +--- .../mpnc/implicit/obstacle/main.cc | 27 +--- .../implicit/thermalnonequilibrium/main.cc | 27 +--- .../richards/implicit/analytical/main.cc | 28 +--- .../richards/implicit/lens/main.cc | 28 +--- .../implicit/nonisothermal/conduction/main.cc | 28 +--- .../implicit/nonisothermal/convection/main.cc | 28 +--- .../nonisothermal/evaporation/main.cc | 28 +--- .../richardsnc/implicit/main.cc | 28 +--- test/porousmediumflow/solidenergy/main.cc | 26 +--- test/porousmediumflow/tracer/2ptracer/main.cc | 28 +--- test/porousmediumflow/tracer/constvel/main.cc | 27 +--- .../tracer/multiphase/main.cc | 27 +--- 155 files changed, 376 insertions(+), 3287 deletions(-) diff --git a/test/common/functions/test_function_l2norm.cc b/test/common/functions/test_function_l2norm.cc index 0133463e1b..a649ffdf3c 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 9841040ef4..acc5407e28 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 934dc7f4ec..2d57336ffc 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 65618da66a..46ea9ec2bf 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 f97c7c7a22..1e17ac008b 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 177aa96515..ca33e3a6da 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 76712a1987..be9f5e923a 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 6e6688f9e4..bc9b3d1318 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 856b3f6517..1f7cf4955c 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 ffbed2d4b5..36218567fb 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 a89d9f50df..5f54a9b558 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 0e9b33e04d..2f4ebe24c5 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 5df69efaa5..cb050e0a98 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 cfbb08cb42..f25cf2dd70 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 aef7046939..c0d1974d0d 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 822f569c20..8b8642b51d 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 0e58e6aa0f..4954f69fc9 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 e74e8bd06c..240e7bc6d1 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 3e77d0573f..7e3b38a7d5 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 4f9691791a..d8980e1270 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 b01f0652fe..f55d39fab7 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 832f92e540..a42535a229 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 29ee863b09..17ea7812d8 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 1dc57ec028..eb202fd4b1 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 4d568bbcf9..f2136767d4 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 a9f50c5ddd..7b35716685 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 34013d7609..646c2719e6 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 851716d130..a9fefc3c81 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 805ad561c1..f880e7b726 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 3099e69c65..6f18181f5b 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 7471c8ab89..f272c0d497 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 235243d67c..8e5a9b0538 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 ca02fb46dc..06f3b7c0c4 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 58a11b78e0..b067c72b15 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 0427bf3a59..4a1339ed65 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 810553428f..30e7414fb1 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 5051f7b2a4..15bd5730e9 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 8c521e6006..077def4387 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 505de29f9f..66335e81d1 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 142b96d346..0c16920668 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 e1c8470a5f..b98e22cc57 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 7f0efc3e1f..62a6db21bb 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 efb6de9912..a9951bc455 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 4b518874ac..89516b94b3 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 9f822348f7..c5c5990ef2 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 f70c788127..500bff6cbc 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 50ef265142..d75c22544a 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 b0cbcdf7b3..ebec049c4b 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 ea097c0b17..479fad4d71 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 2b7399e1f0..df8a729257 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 dea02382a1..afdd70bce1 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 295d628c45..b4e4e2fbe7 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 18973ad61e..0303aa2d47 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 b43d5dec28..4fd3826811 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 976f666684..4d6805ad63 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 23673ae230..0426bc008b 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 d1d9a843bb..bde55e77b5 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 30cd5de035..faa4476161 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 b894b09544..b7ae1d4758 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 4d58feb985..fe05d7533c 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 0586710f4f..0893455a19 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 ac91436af8..c9e487ba50 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 d932bc576f..fa2830c8c0 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 9bee707023..170d603775 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 271ddaf52a..21df844112 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 17f44a6b69..7c913aed7b 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 e457f6ff88..3c738de2e0 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 4d5e8b9561..232f6b1bba 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 50c0de1e61..2ed227d596 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 a9550162ab..68f338b72f 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 ab63df6110..cecb1580c5 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 28519da129..0b9343669e 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 771d54f04e..dffc2545e3 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 ad62d28fd7..b8286b1906 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 9b7427ab04..866bad7a15 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 a7d264ecdf..dce774e341 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 1d1ff9c59d..fffe9cf739 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 26644b774b..4ac82416b1 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 987a3b6d5e..fa85879640 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 b50d1f9863..6ac2ad9118 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 85de4b83f5..0be34ab9e0 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 18f453171b..21b19254e1 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 bb903d4b7e..98b3a7e68e 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 5f42fea471..d6faa41415 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 ce40d13cae..98d2396efd 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 7a0c07b05d..48f4956c13 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 e71e4427b7..fe752ec094 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 992cfe962c..7c1d07fa89 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 f53a190f27..7291bae011 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 88dcbea992..d008aff2b7 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 7394386149..3a0d48a0d7 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 ddf18f5305..509e4eb9fa 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 6e9e6c3bbb..26566d80be 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 126598f7ae..2c15f35aae 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 7fa845f47b..a1e8344c32 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 371324473a..38608680a0 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 e6c248c6ca..8e8d1e13e0 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 0b3a3749cf..4f3818bcb7 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 4de2454e2f..53eae1f381 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 2e258f7c16..c82ffbe05f 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 9cffbe4932..c1569a4c94 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 7b01d2f217..9a420da9df 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 3bbdcb7ab9..d6c388f43e 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 dc367256a1..ed1c0563a7 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 f616c8a638..0791d01081 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 b2e5a26539..eda76e7779 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 2664ba957c..540f7525ae 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 d3f834de13..69c9f817c8 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 50835dea1b..4410a00d78 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 203a5a63fc..ef2cb22078 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 2f9d576471..8f1f30997c 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 1cee100c9a..8d6cf4242a 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 d1d0638572..307fc933ec 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 07157a6e5f..59c51f3f2d 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 44512751dd..bf92c55626 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 757cc50dad..6fe43aa027 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 556cccc733..912b99d799 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 d0b46a8500..65ee5f3c5b 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 38bae0b6ad..0d7c8192bb 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 27c2bbb504..3ea0c65e18 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 f088097842..9b56ad1e0d 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 d4682f3078..9ca39ee8d0 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 1214706655..8b79a207fe 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 beb0ebb083..18e51454b1 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 3d4ffbcc4b..e045c8895d 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 9fb9c38c7e..87b37d004a 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 1ad16cdbb6..74703c0220 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 d06395e63f..e58832f747 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 e856f339b0..76a1403348 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 6b73087e2a..1eac73b2de 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 d7655ebd73..5dc0aba8a0 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 fa31e1e6b9..7424d619b1 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 c4452b6e7c..33dd43a492 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 0178e59dbf..6131221121 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 06edc34d72..87ad24cecf 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 491544c345..5f0ad940f6 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 87c966bc89..ae2ce88c78 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 87c966bc89..ae2ce88c78 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 87c966bc89..ae2ce88c78 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 ebfc92dbfd..b00be17e4d 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 37b9d7d28e..b65ee0c03d 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 92f91285c6..09e8067693 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 e816ec9f8d..bcd56dceae 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 92f91285c6..09e8067693 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 062e3f1c5b..9685987600 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 951d959a98..234f99b9d9 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 781509124a..f58d731226 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 8147116666..15c6631842 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 8147116666..15c6631842 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 7fa13f7e18..f11bf909c3 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 0d0d94c8f7..b2ae15ca22 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 f210a5903c..5d2e8c7be3 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 9b3fafee26..053f2d4699 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 e6aaa863dc..ee423251b2 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 a797ee6f6a..41afd56645 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; -} -- GitLab