Minimalist printing version (no squirrel, no "Back to Top" links)
Exception Handling Presentation Overview
|
IF y = 0 THEN WriteString('Error: denominator is zero!'); WriteLn; ELSE ratio := x DIV y; END; |
|
void might_break(int i) { if (i == 1) throw "something!"; if (i == 4) throw 4; // ... } void p (int i) { // try // begin try block { might_break(i); } catch (const char *p) // begin handler { cout << "caught " << p; // fix whatever... } // end try block } // end handler |
|
Glow:: read(..args..){ Try { This and that.. Return whatever.. } catch ( I.) // catch anything throw; //rethrow the current exception.. } |
|
subprogram specification declarations begin statements exception one or more exception handlers end; |