- Timestamp:
- Aug 31, 2021, 1:49:10 AM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, pthread-emulation, qualifiedEnum
- Children:
- f62e741
- Parents:
- 57dff2f
- git-author:
- Jacob Prud'homme <jafprudhomme@…> (08/06/21 00:56:45)
- git-committer:
- Jacob Prud'homme <jafprudhomme@…> (08/31/21 01:49:10)
- Location:
- libcfa/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/parseconfig.cfa
r57dff2f rd322f62 9 9 10 10 11 EHM_VIRTUAL_TABLE(Validation_Failure, Validation_Failure_main_table); 11 static vtable(Validation_Failure) Validation_Failure_vt; 12 12 13 void ?{}( Validation_Failure & this, config_entry & entry ) with ( entry ) { 13 this.virtual_table = &Validation_Failure_ main_table;14 this.virtual_table = &Validation_Failure_vt; 14 15 this.key = key; 15 16 this.variable = variable; 16 }17 void throwValidation_Failure( config_entry & entry ) {18 Validation_Failure exc = { entry };19 17 } 20 18 … … 122 120 // Validate the parsed data, if necessary 123 121 if ( entries[j].validate != (bool (*)(void *))0p ) { 124 if ( !entries[j].validate( entries[j].variable ) ) throw Validation_Failure( entries[j] );122 if ( !entries[j].validate( entries[j].variable ) ) throw (Validation_Failure){ entries[j] }; // HERE (segfaults on throw) 125 123 } 126 124 -
libcfa/src/parseconfig.hfa
r57dff2f rd322f62 56 56 57 57 58 EHM_EXCEPTION(Validation_Failure)( 58 exception Validation_Failure { 59 59 const char * key; 60 60 void * variable; 61 );61 }; 62 62 63 63 void ?{}( Validation_Failure & this, config_entry & entry );
Note: See TracChangeset
for help on using the changeset viewer.