Changeset 3bf9d10 for tests/exceptions/data-except.cfa
- Timestamp:
- Jun 21, 2023, 9:45:08 PM (13 months ago)
- Branches:
- master
- Children:
- 6065281f
- Parents:
- 2de175ce
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/exceptions/data-except.cfa
r2de175ce r3bf9d10 1 1 // Test exceptions that add data but no functionality. 2 3 #include <fstream.cfa> 2 4 3 5 exception paired { … … 18 20 throw except; 19 21 } catch (paired * exc) { 20 printf("%s(%d, %d)\n", virtual_msg(exc), exc->first, exc->second);22 sout | virtual_msg(exc) | '(' | exc->first | ", " | exc->second | ')'; 21 23 ++exc->first; 22 24 } 23 25 24 printf("%s(%d, %d)\n", virtual_msg(&except), except.first, except.second);26 sout | virtual_msg(&except) | '(' | except.first | ", " | except.second | ')'; 25 27 26 28 try { 27 29 throwResume except; 28 30 } catchResume (paired * exc) { 29 printf("%s(%d, %d)\n", virtual_msg(exc), exc->first, exc->second);31 sout | virtual_msg(exc) | '(' | exc->first | ", " | exc->second | ')'; 30 32 ++exc->first; 31 33 } 32 34 33 printf("%s(%d, %d)\n", virtual_msg(&except), except.first, except.second);35 sout | virtual_msg(&except) | '(' | except.first | ", " | except.second | ')'; 34 36 }
Note: See TracChangeset
for help on using the changeset viewer.