Commit ffc3d345 authored by Christoph Grüninger's avatar Christoph Grüninger

Adjust exception handling in tests.

Dune::Exception is derived from std::exception.
parent 09a1a6df
......@@ -125,11 +125,7 @@ int main (int argc , char ** argv)
timeloop(grid, 0.5, minLevel, maxLevel);
}
catch (std::exception & e) {
std::cout << "STL ERROR: " << e.what() << std::endl;
return 1;
}
catch (Dune::Exception & e) {
std::cout << "DUNE ERROR: " << e.what() << std::endl;
std::cout << "ERROR: " << e.what() << std::endl;
return 1;
}
catch (...) {
......
......@@ -142,11 +142,7 @@ int main(int argc, char **argv)
dowork( *gridPtr );
}
catch (std::exception & e) {
std::cout << "STL ERROR: " << e.what() << std::endl;
return 1;
}
catch (Dune::Exception & e) {
std::cout << "DUNE ERROR: " << e.what() << std::endl;
std::cout << "ERROR: " << e.what() << std::endl;
return 1;
}
catch (...) {
......
......@@ -103,11 +103,7 @@ int main (int argc , char ** argv)
timeloop(grid, 0.5);
}
catch (std::exception & e) {
std::cout << "STL ERROR: " << e.what() << std::endl;
return 1;
}
catch (Dune::Exception & e) {
std::cout << "DUNE ERROR: " << e.what() << std::endl;
std::cout << "ERROR: " << e.what() << std::endl;
return 1;
}
catch (...) {
......
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
// Dune includes
#include <config.h> // file constructed by ./configure script /*@\label{gs:inc0}@*/
#include <config.h> // file generated by CMake
#include <array>
#include <memory>
#include <dune/common/parallel/mpihelper.hh> // include mpi helper class
......@@ -28,11 +27,7 @@ int main(int argc, char **argv)
Dune::gridinfo(grid);
}
catch (std::exception & e) {
std::cout << "STL ERROR: " << e.what() << std::endl;
return 1;
}
catch (Dune::Exception & e) {
std::cout << "DUNE ERROR: " << e.what() << std::endl;
std::cout << "ERROR: " << e.what() << std::endl;
return 1;
}
catch (...) {
......
......@@ -2,7 +2,7 @@
// vi: set et ts=4 sw=2 sts=2:
// Dune includes
#include <config.h> // file constructed by ./configure script
#include <config.h> // file generated by CMake
#include <iomanip>
#include <iostream>
#include <dune/grid/yaspgrid.hh> // load yaspgrid definition
......@@ -80,11 +80,7 @@ int main(int argc, char **argv)
uniformintegration( *gridPtr );
}
catch (std::exception & e) {
std::cout << "STL ERROR: " << e.what() << std::endl;
return 1;
}
catch (Dune::Exception & e) {
std::cout << "DUNE ERROR: " << e.what() << std::endl;
std::cout << "ERROR: " << e.what() << std::endl;
return 1;
}
catch (...) {
......
......@@ -40,11 +40,7 @@ int main(int argc, char **argv)
#endif
}
catch (std::exception & e) {
std::cout << "STL ERROR: " << e.what() << std::endl;
return 1;
}
catch (Dune::Exception & e) {
std::cout << "DUNE ERROR: " << e.what() << std::endl;
std::cout << "ERROR: " << e.what() << std::endl;
return 1;
}
catch (...) {
......
......@@ -118,11 +118,7 @@ int main (int argc , char ** argv)
}
catch (std::exception & e) {
std::cout << "STL ERROR: " << e.what() << std::endl;
return 1;
}
catch (Dune::Exception & e) {
std::cout << "DUNE ERROR: " << e.what() << std::endl;
std::cout << "ERROR: " << e.what() << std::endl;
return 1;
}
catch (...) {
......
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
#include <config.h> // file constructed by ./configure script
#include <config.h> // file generated by CMake
// C/C++ includes
#include <iostream> // for standard I/O
......@@ -130,11 +130,7 @@ int main(int argc, char **argv)
traversal(grid); /*@\label{tc:call}@*/
}
catch (std::exception & e) {
std::cout << "STL ERROR: " << e.what() << std::endl;
return 1;
}
catch (Dune::Exception & e) {
std::cout << "DUNE ERROR: " << e.what() << std::endl;
std::cout << "ERROR: " << e.what() << std::endl;
return 1;
}
catch (...) {
......
......@@ -88,11 +88,7 @@ int main(int argc, char **argv)
#endif // #if HAVE_ALUGRID
}
catch (std::exception & e) {
std::cout << "STL ERROR: " << e.what() << std::endl;
return 1;
}
catch (Dune::Exception & e) {
std::cout << "DUNE ERROR: " << e.what() << std::endl;
std::cout << "ERROR: " << e.what() << std::endl;
return 1;
}
catch (...) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment