Changeset b81fd95 for tests/exceptions
- Timestamp:
 - Jul 29, 2020, 11:29:01 PM (5 years ago)
 - Branches:
 - ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
 - Children:
 - 0c760db
 - Parents:
 - 1d17939
 - Location:
 - tests/exceptions
 - Files:
 - 
      
- 2 edited
 
- 
          
  conditional.cfa (modified) (1 diff)
 - 
          
  defaults.cfa (modified) (2 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
tests/exceptions/conditional.cfa
r1d17939 rb81fd95 17 17 }; 18 18 19 voidnum_error_msg(num_error * this) {19 const char * num_error_msg(num_error * this) { 20 20 if ( ! this->msg ) { 21 21 static const char * base = "Num Error with code: X";  - 
      
tests/exceptions/defaults.cfa
r1d17939 rb81fd95 13 13 } 14 14 15 c har * get_log_message(log_message * this) {15 const char * get_log_message(log_message * this) { 16 16 return this->msg; 17 17 } … … 28 28 // We can catch log: 29 29 try { 30 throwResume (log_message){ (char *)"Should be printed.\n"};30 throwResume (log_message){"Should be printed.\n"}; 31 31 } catchResume (log_message * this) { 32 32 printf("%s", this->virtual_table->msg(this)); 33 33 } 34 34 // But we don't have to: 35 throwResume (log_message){ (char *)"Should not be printed.\n"};35 throwResume (log_message){"Should not be printed.\n"}; 36 36 } 37 37  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.