This source file includes following definitions.
- main
- print_errMsg
1 #include <iostream>
2 #include <config.h>
3 #include <dune/fem/io/parameter.hh>
4 #include <dune/common/exceptions.hh>
5
6 #include "brusselator_algo.h"
7
8 void print_errMsg(const std::exception&);
9
10 int main(int argc, char** argv) try{
11
12 Esfem::brusselator_algo(argc, argv);
13 }
14 catch(const Dune::Exception& e){
15 std::cerr << "Dune error: " << e << std::endl;
16 return 1;
17 }
18 catch(const std::exception& e){
19 print_errMsg(e);
20 return 2;
21 }
22
23
24
25
26 void print_errMsg(const std::exception& e){
27 std::cerr << e.what() << '\n';
28 try{
29 std::rethrow_if_nested(e);
30 }
31 catch(const std::exception& nested){
32 print_errMsg(nested);
33 }
34 }