[Output Generation] Expose a public function to override error function
Ported Issue from Mantis Original ID: 1586 Reported By: josh2
SEVERITY: MINOR Submitted: 2009-04-07 09:50:45
OS: --
VERSION: 2.22.2
DESCRIPTION
The errorfn set in gvNEWcontext() can't be overridden outside GraphViz
because the struct GVC_s defined in gvcint.h is not exposed.
Is it possible to provide a public function to override the errorfn
so that I can redirect error messages to some places other than console?
ADDITIONAL INFORMATION
[erg] If you just want to keep messages from going to the console, call
agseterr(AGMAX);
In general, error handling needs to be redone. A library should not call exit() without involving the application.
[josh] The use of agseterror(AGMAX) doesn't meet my need. What I want to do is to redirect error messages from console to my GUI widget. I searched all public functions in GraphViz and couldn't find one that does
gvc->common.errorfn = my_function;
As you said, you are planning to rewrite the error handling part of GraphViz. Any schedule set?