MechSys  1.0
Computing library for simulations in continuum and discrete mechanics
Classes | Defines | Variables
/home/dorival/mechsys/lib/util/fatal.h File Reference
#include <iostream>
#include <cstdarg>
#include <exception>
#include <mechsys/util/string.h>

Go to the source code of this file.

Classes

class  Fatal

Defines

#define MECHSYS_FINALIZE   return 1;
#define MECHSYS_MPI_CATCH
#define MECHSYS_MPI_INIT
#define MECHSYS_BPY_CATCH
#define MECHSYS_CATCH

Variables

bool MECHSYS_CATCH_PARALLEL = false

Define Documentation

#define MECHSYS_CATCH
Value:
catch (Fatal      * e)     { e->Cout();  delete e;                                                   MECHSYS_FINALIZE } \
                      catch (char const * m)     { printf("%sFatal: %s%s\n",TERM_RED,m       ,TERM_RST);                   MECHSYS_FINALIZE } \
                      catch (std::exception & e) { printf("%sFatal: %s%s\n",TERM_RED,e.what(),TERM_RST);                   MECHSYS_FINALIZE } \
                      MECHSYS_MPI_CATCH                                                                                                       \
                      MECHSYS_BPY_CATCH                                                                                                       \
                      catch (...)                { printf("%sFatal: Some exception (...) occurred%s\n",TERM_RED,TERM_RST); MECHSYS_FINALIZE }
#define MECHSYS_FINALIZE   return 1;

Variable Documentation

bool MECHSYS_CATCH_PARALLEL = false
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines