- File:
-
- 1 edited
-
tests/exceptions/data-except.cfa (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/exceptions/data-except.cfa
rfe0b94f rd00d581 1 1 // Test exceptions that add data but no functionality. 2 3 #include <fstream.hfa>4 2 5 3 exception paired { … … 20 18 throw except; 21 19 } catch (paired * exc) { 22 sout | virtual_msg(exc) | '(' | exc->first | ", " | exc->second | ')';20 printf("%s(%d, %d)\n", virtual_msg(exc), exc->first, exc->second); 23 21 ++exc->first; 24 22 } 25 23 26 sout | virtual_msg(&except) | '(' | except.first | ", " | except.second | ')';24 printf("%s(%d, %d)\n", virtual_msg(&except), except.first, except.second); 27 25 28 26 try { 29 27 throwResume except; 30 28 } catchResume (paired * exc) { 31 sout | virtual_msg(exc) | '(' | exc->first | ", " | exc->second | ')';29 printf("%s(%d, %d)\n", virtual_msg(exc), exc->first, exc->second); 32 30 ++exc->first; 33 31 } 34 32 35 sout | virtual_msg(&except) | '(' | except.first | ", " | except.second | ')';33 printf("%s(%d, %d)\n", virtual_msg(&except), except.first, except.second); 36 34 }
Note:
See TracChangeset
for help on using the changeset viewer.