tfm-report/img/try-catch-example.dot

41 lines
1.2 KiB
Text
Raw Normal View History

2019-12-05 14:01:29 +01:00
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()>];
2019-12-09 21:47:09 +01:00
f -> { NR; catch; };
NR [label = <normal return<br/>x = x_out>];
catch [label = <catch<br/>y = y_out>];
NR -> Y -> Z;
catch -> "print(error)" -> Z -> "normal exit" -> exit;
2019-12-05 14:01:29 +01:00
{ edge [style = dashed, constraint = false];
try -> Z;
catch -> Z;
2019-12-09 21:47:09 +01:00
NR -> Z;
2019-12-05 14:01:29 +01:00
}
}
subgraph b {
method [label="Start", shape=rect];
t [label = "try"];
x [label = "X"];
2019-12-09 21:47:09 +01:00
x_in [label = "x_in = x", style = dashed];
y_in [label = "y_in = y", style = dashed];
2019-12-05 14:01:29 +01:00
call [label = "f()"];
2019-12-06 20:35:20 +01:00
nr [style=dashed, label = "normal return"];
2019-12-05 14:01:29 +01:00
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}
}
}