Graphviz 13.0.0~dev.20241220.2304
|
Typedefs | |
typedef int(* | agusererrf) (char *) |
Enumerations | |
enum | agerrlevel_t { AGWARN , AGERR , AGMAX , AGPREV } |
Functions | |
agerrlevel_t | agseterr (agerrlevel_t) |
char * | aglasterr (void) |
int | agerr (agerrlevel_t level, const char *fmt,...) |
void | agerrorf (const char *fmt,...) |
void | agwarningf (const char *fmt,...) |
int | agerrors (void) |
int | agreseterrors (void) |
agusererrf | agseterrf (agusererrf) |
The library provides a variety of mechanisms to control the reporting of errors and warnings. A message is only written if its type has higher priority than a programmer-controlled minimum, which is AGWARN by default. The programmer can set this value using agseterr, which returns the previous value. Calling agseterr(AGMAX)
turns off the writing of messages.
The function agerr is the main entry point for reporting an anomaly. The first argument indicates the type of message. Usually, the first argument is AGWARN or AGERR to indicate warnings and errors, respectively. Sometimes additional context information is only available in functions calling the function where the error is actually caught. In this case, the calling function can indicate that it is continuing the current error by using AGPREV as the first argument. The remaining arguments to agerr are the same as the arguments to printf
.
The functions agwarningf and agerrorf are shorthand for agerr(AGWARN,...)
and agerr(AGERR,...)
, respectively.
Some applications desire to directly control the writing of messages. Such an application can use the function agseterrf to register the function that the library should call to actually write the message. The previous error function is returned. By default, the message is written to stderr
.
Errors not written are stored in a log file. The last recorded error can be retrieved by calling aglasterr. Unless the printing of error messages has been completely disabled by a call to agseterr(AGMAX)
, standard error must not be wide-oriented, even if a user-provided error printing function is provided.
The function agerrors returns non-zero if errors have been reported.
enum agerrlevel_t |
int agerr | ( | agerrlevel_t | level, |
const char * | fmt, | ||
... | |||
) |
Definition at line 155 of file agerror.c.
References agerr_va().
Referenced by bundle(), compoundEdges(), dot_concentrate(), emit_clusters(), error_context(), init_rank(), init_xdot(), kkNeato(), majorization(), make_flat_adj_edges(), make_label(), multicolor(), neato_layout(), neatoModel(), poly_gencode(), setEdgeLen(), stress_majorization_kD_mkernel(), and twopi_layout().
void agerrorf | ( | const char * | fmt, |
... | |||
) |
Definition at line 165 of file agerror.c.
References AGERR, and agerr_va().
Referenced by aagerror(), aagerror(), add_tree_edge(), agapply(), agdelete(), agdictof(), aggetrec(), agraphof(), agroot(), boxIntersectf(), bundle(), charsetToStr(), checkpath(), circleLayout(), clarify(), conjugate_gradient(), conjugate_gradient_f(), conjugate_gradient_mkernel(), contain_nodes(), coordOf(), delaunay_tri(), delaunay_triangulation(), deriveGraph(), do_ordering_for_nodes(), dotneato_args_initialize(), find_ints(), freeSurface(), get_triangles(), getsplinepoints(), gvconfig(), gvLayout(), gvLayoutJobs(), gvNEWcontext(), gvNextInputGraph(), gvplugin_library_load(), gvplugin_package_record(), gvPluginList(), gvprintf(), gvRender(), gvrender_resolve_color(), gvRenderContext(), gvRenderData(), gvRenderFilename(), gvRenderJobs(), htmlerror(), htmllex(), init_nop(), init_rank(), install_in_rank(), invalidate_path(), largeMinlen(), makeAddPoly(), makePoly(), makeSpline(), map_edge(), mkSurface(), neato_extra_args(), opensubg(), opensubg(), ordered_edges(), parse_style(), parseSegs(), picfontname(), PQ_insert(), rebuild_vlists(), record_init(), RectArea(), remove_overlap(), routesplines_(), seg_cmp(), setDouble(), setInt(), simpleSplineRoute(), size_html_img(), SparseMatrix_import_dot(), strong(), update(), user_pos(), virtual_weight(), and x_cutval().
int agerrors | ( | void | ) |
Definition at line 181 of file agerror.c.
References agmaxerr.
Referenced by dotread(), dotstring(), gvFreeContext(), and main().
char * aglasterr | ( | void | ) |
int agreseterrors | ( | void | ) |
Definition at line 183 of file agerror.c.
References agmaxerr.
Referenced by CFrmSettings::drawGraph(), and main().
agerrlevel_t agseterr | ( | agerrlevel_t | lvl | ) |
Definition at line 38 of file agerror.c.
References agerrlevel.
Referenced by dotneato_args_initialize().
agusererrf agseterrf | ( | agusererrf | newf | ) |
void agwarningf | ( | const char * | fmt, |
... | |||
) |
Definition at line 173 of file agerror.c.
References agerr_va(), and AGWARN.
Referenced by addXLabels(), arrow_match_name(), cat_libfile(), check_fontname(), checkCompound(), checkExp(), checkStart(), chkNum(), chkNum(), chkPos(), compile_samerank(), compoundEdges(), dot_mincross(), dot_splines_(), edgeType(), emit_xdot(), epsf_init(), estimate_character_width_canonical(), fdp_initParams(), fdpSplines(), fillMap(), findCharset(), findStopColor(), firstlayer(), genroute(), get_metrics_for_font_family(), getAdjustMode(), getCluster(), gmlerror(), gvloadimage(), gvplugin_library_load(), gvrender_resolve_color(), gvrender_set_style(), gvusershape_file_access(), gvusershape_open(), htmlEntityUTF8(), init_job_pagination(), init_xdot(), initHTMLlexer(), initial_positions(), insert(), kkNeato(), layout(), lenattr(), make_flat_adj_edges(), makeCompoundEdge(), mark_clusters(), merge_oneway(), neatoMode(), neatoModel(), nomacros(), nomacros(), orthoEdges(), parse_layers(), parse_layerselect(), parse_style(), parseSegs(), poly_init(), poly_port(), ps_string(), rebuild_vlists(), record_port(), removeOverlapWith(), routesplines_(), safefile(), setAspect(), setattr(), setFDPAttr(), sgd(), size_html_cell(), size_html_tbl(), solve_model(), spline_edges0(), spline_edges_(), stress_majorization_kD_mkernel(), tuneControl(), twopi_layout(), unrecognized(), unsupported(), user_init(), user_shape(), user_spline(), versionStr2Version(), and write_xdots().