root/src/brusselator_main.cpp

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. main
  2. print_errMsg

   1 #include <iostream>
   2 #include <config.h>
   3 #include <dune/fem/io/parameter.hh>
   4 #include <dune/common/exceptions.hh>
   5 // #include "linHeat_algo.h"
   6 #include "brusselator_algo.h"
   7 
   8 void print_errMsg(const std::exception&);
   9 
  10 int main(int argc, char** argv) try{
  11   // linHeat_algo(argc, argv);
  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 // Internal Implementation
  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 }

/* [<][>][^][v][top][bottom][index][help] */