From: Daniel Dreyer <ddreyer@us...> - 2003-10-14 11:14:55
Oops, seems as if this didn't make it to libmesh-devel
the first time...
---------- Forwarded message ----------
Date: Mon, 6 Oct 2003 21:34:23 +0200 (MEST)
From: Daniel Dreyer <d.dreyer@...>
To: libMesh Developer list <libmesh-devel@...>
Cc: Michael Anderson <michaela@...>
Subject: Re: [Libmesh-devel] Re: saviac, error code
I am perfectly with your concept, but it weren't me when i had nothing to
As far as i understand, exceptions are very elegant. But how far is
elegance portable? Do all our beloved C++ compilers handle exceptions
well, or do we open up a box of bugs?
Another issue: we would have to rewrite more code.
as an alternative, one could:
- define an enum libMeshErrorCode
- each call to the error() macro would have to be changed to
- and namespace libMesh has vectors (or perhaps a std::map?):
std::vector<unsigned short int> n_acceptable_errors;
- where the user can register the acceptable errors, and also
the amount of each until abort().
- to even have a history of errors, one could also think of:
which gets push_back()'ed each accepted error once it occurs
This would require less code changes, i'd say -- yeah, i'm the lazy
but exceptions are probably better, at least they should be pretty cool
and more professional on the web page to say "full exception handling"