1: #line 2331 "./lpsrc/flx_tutorial.pak"
2:
3:
4: proc bad_calc(err: int -> void)
5: {
6:
7: err 1;
8: }
9:
10: proc main
11: {
12: proc err(errno:int)
13: {
14: print "error "; print errno;
15: print " -- aborting"; endl;
16: goto resume;
17: }
18: bad_calc err of (int);
19: print "no error"; endl;
20: resume:>
21: print "error handled, continuing"; endl;
22: }
23: main;
24:
Here, we establish a handler for an error,
which is effectively established at the
label resume: the handler is passed explicitly
to the routine which may 'raise' it.