From: Derek G. <fri...@gm...> - 2008-02-20 00:09:05
|
> In the long run we should never be calling error(), just throwing > exceptions. Even if the library has an error we can't recover from, > that's no reason not to let the application using the library try. Just wanted to chime in and say that I agree here. We could come up with a couple of objects to throw so you can do things like: throw RuntimeError("Negative Jacobian!"); That's the kind of stuff we have in Sierra... and it works pretty well. As for the stack trace stuff... I've never looked at what's in libMesh... I'll have to check it out. In Sierra we literally modify every function to instantiate a little "Trace" object at the beginning.... we have some scripts that do this for us. I guess this is so that it works on all of our funky platforms (we compile with all kinds of crazy compilers). If you guys are interested in that stuff, I'm pretty sure it's open source and we could use it... Derek |