From: Derek G. <fri...@gm...> - 2008-08-20 17:40:33
|
On Wed, Aug 20, 2008 at 11:20 AM, Roy Stogner <ro...@st...> wrote: > Yup, I committed it to libmesh_common.h this morning. Thanks! > We'll eventually want to handle those differently, I think, but not > before 0.6.3 final. I've thought more about your idea of putting a > location-specific string in the exception constructors, and I think > you're probably right in the long run. That way application code that > wanted something different than cerr output could intercept exceptions > itself, and do something like an error file or a GUI dialog box if > that was preferable. This sounds like a good idea... and if it can be made automatic.... all the better! The one thing I will say about manual strings is that it might provide more fine-grained error messages. For instance, maybe there is a function that is mostly implemented except if something specific is passed in... in that case it might be nice to be able to hand code a message... And in the spirit of thinking of GUI dialog boxes (ah - we dreaming big today!).... it would be great to have a general error object that we can throw with a specific text message that a GUI application could catch. I'm not a huge fan of these schemes in general, but there are certain times that they make sense... Derek |