Number: 1627
Title: Expose a public function to override error function
Submitter: josh
Date: Tue Apr 7 04:50:45 2009
Subsys: Output generation
Version: 2.22.2
System: *-*-
Severity: minor
Problem:
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?
Comments:
[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?
Owner: *
Status: *