new graphs
This commit is contained in:
parent
79cd9dafd6
commit
f29182fed4
2 changed files with 40 additions and 0 deletions
40
img/try-catch-example.dot
Normal file
40
img/try-catch-example.dot
Normal file
|
@ -0,0 +1,40 @@
|
|||
digraph G {
|
||||
subgraph a {
|
||||
enter [shape=rect];
|
||||
exit [shape=rect];
|
||||
enter -> try;
|
||||
try -> X -> f;
|
||||
f [label = <x_in = x<br/>y_in = y<br/>f()>];
|
||||
f -> { "normal return"; catch; };
|
||||
"normal return" -> "x = x_out" -> Y -> Z;
|
||||
catch -> "y = y_out" -> "print(error)" -> Z -> "normal exit" -> exit;
|
||||
{ edge [style = dashed, constraint = false];
|
||||
enter -> exit;
|
||||
try -> Z;
|
||||
catch -> Z;
|
||||
"normal return" -> Z;
|
||||
}
|
||||
}
|
||||
|
||||
subgraph b {
|
||||
method [label="Start", shape=rect];
|
||||
t [label = "try"];
|
||||
x [label = "X"];
|
||||
x_in [label = "x_in = x"];
|
||||
y_in [label = "y_in = y"];
|
||||
call [label = "f()"];
|
||||
nr [style=dashed];
|
||||
data [style=dashed, label = "x = x_out"];
|
||||
y [label = "Y"];
|
||||
c [label = "catch"];
|
||||
data_catch [style=dashed,label="y = y_out"];
|
||||
print [label = "print(error)"];
|
||||
z [label = "Z"];
|
||||
ne [style=dashed, label = "normal exit"];
|
||||
method -> {t z ne};
|
||||
t -> {x call}
|
||||
call -> {x_in y_in nr c}
|
||||
nr -> {data y}
|
||||
c -> {data_catch print}
|
||||
}
|
||||
}
|
BIN
img/try-catch-example.pdf
Normal file
BIN
img/try-catch-example.pdf
Normal file
Binary file not shown.
Loading…
Reference in a new issue