From: Rafael L. <rla...@us...> - 2004-01-01 21:35:37
|
* Rafael Laboissiere <rla...@us...> [2004-01-01 18:17]: > * Maurice LeBrun <mj...@ga...> [2004-01-01 03:38]: > > > As for plabort() -- it's to be used when something goes wrong that doesn't > > require calling plexit() but for which there is no useful recovery. As such, > > I can see a clear opportunity for extension here -- an abort handler, set by a > > new call plsabort(). That way you could turn the abort string (normally sent > > to stderr) into an exception in your own code and handle at will. Just an > > idea. > > I have had exactly the same idea. If I find some time, I will implement > this, modelled after plexit/plsexit. Also, the API section of the DocBook > documentation on plexit must be updated. I just implemented/tested/cvs-committed the plabort/plsabort changes. I completely mimic what was done for plexit/plsexit. The only difference is that the abort handler function does not return an int status code (like the exit handler): void (*abort_handler) (char *errormsg); I am not still fully convinced we are doing the best we can as regards error handling in the PLplot library. I will look at how other libraries do to get some ideas. When I will have some time, I will try to use plsexit and plsabort in my gnome driver to divert error messages to a pop-up window. This will allow me to test some ideas about error handling. -- Rafael |