1.43. Static exception handling using goto

Non local gotos are very useful for another form of exception handling. Consider the following example:
Start C++ section to tut/examples/tut152.flx[1 /1 ]
     1: include "std";
     2: 
     3: proc main
     4: {
     5:   // do something
     6: 
     7:   // raise err1
     8:   err 1; goto resume;
     9: 
    10:   // do something else
    11: 
    12:   // exception handlers
    13:   proc err(errno:int)
    14:   {
    15:     print "error "; print errno;
    16:     print " -- aborting"; endl;
    17:     goto resume;
    18:   }
    19: resume:>
    20:   print "error handled, continuing"; endl;
    21: }
    22: 
End C++ section to tut/examples/tut152.flx[1]