Changeset 6ac5223 for src/tests/except-2.c
- Timestamp:
- Aug 17, 2017, 3:42:21 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- e50e9ff
- Parents:
- 97e3296 (diff), 21f0aa8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/except-2.c
r97e3296 r6ac5223 80 80 } 81 81 num_error_vtable _num_error_vtable_instance @= { 82 & ___cfaehm__base_exception_t_vtable_instance,82 &INSTANCE(BASE_EXCEPT), 83 83 sizeof(num_error), ?{}, ^?{}, 84 84 num_error_msg, num_error_code … … 91 91 yin black; 92 92 throw (BASE_EXCEPT *)&black; 93 } catch ( yin * error ) {93 } catch ( yin * error ) { 94 94 printf("throw yin caught.\n"); 95 95 } … … 99 99 throwResume (BASE_EXCEPT *)&white; 100 100 printf("> throwResume returned.\n"); 101 } catchResume ( yang * error ) {101 } catchResume ( yang * error ) { 102 102 printf("throwResume yang caught <"); 103 103 } 104 104 105 /* Conditional catches are still a work in progress.106 105 try { 107 106 num_error x = { 2 }; 108 throw ( struct exception_t*)&x;107 throw (BASE_EXCEPT *)&x; 109 108 } 110 catch (num_error * error 0 ; 3 == error0->virtual_table->code( error0) ) {111 printf("exception at %p\n", error 0);109 catch (num_error * error ; 3 == error->virtual_table->code( error ) ) { 110 printf("exception at %p\n", error ); 112 111 printf("Should not be printed.\n"); 113 112 } 114 catch (num_error * error 1 ; 2 == error1->virtual_table->code( error1) ) {113 catch (num_error * error ; 2 == error->virtual_table->code( error ) ) { 115 114 printf("Should be printed.\n"); 116 } */115 } 117 116 } 118 117
Note:
See TracChangeset
for help on using the changeset viewer.