class GRAPH_EXC < $STR
****
The graph exception class. A single class is used for all library graph exceptions for simplicity and sanity. It may make sense to split this class up at some future point The error states are denoted by the constants beginning with err_ err should be set to one of these
_
Usage:
____raise_#DIGRAPH_EXC{INT}(self,"foo",g,"bad_graph").missing_edge_labels;
__
____protect
_____...
____when_$STR_then_#OUT+exception.str;_end;
You can also check for more detailed information in the exception object. In general, you can compare the "err" flag to see which of the constants it is set to.
____switch_exception.err
____when_exception.err_missing_edge_labels_then__--_do_somethin
____when_exception.err_missing_node_labels_then_...
____else_..._end;


Ancestors
$STR



Public


Readable Attributes
attr err: STR;
**** Err should be set to one of the constant err_ strings
attr graph: $STR;
attr in_object: $OB;
**** Object in which error occurs.
attr message: STR;
attr routine_name: STR;

Constants
const err_missing_edge_labels: STR := "All edges not labelled";
const err_missing_node_labels: STR := "All nodes not labelled";
const err_not_specified: STR := "No error specified";

Features
create(inobj: $OB,rout: STR,g:$STR,msg: STR): SAME
missing_edge_labels: SAME
**** All edges were required to be labelled (possibly with weights) but some labels were missing
missing_node_labels: SAME
**** All nodes were required to be labelled (possibly weighted) but some were missing
print(file: $OSTREAM)
str: STR


Private

attr err: STR;
**** Err should be set to one of the constant err_ strings
attr graph: $STR;
attr in_object: $OB;
**** Object in which error occurs.
attr message: STR;
attr routine_name: STR;

The Sather Home Page