- 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:
- 5993b6a
- Parents:
- 6d8e1ab
- git-author:
- Jacob Prud'homme <jafprudhomme@…> (08/06/21 22:16:38)
- git-committer:
- Jacob Prud'homme <jafprudhomme@…> (08/31/21 01:49:10)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/parseconfig.cfa
r6d8e1ab ra0d6987 130 130 for ( j; num_entries ) { 131 131 if ( strcmp( src_key, entries[j].key ) != 0 ) continue; 132 if ( entries[j].parse( src_value, entries[j].variable ) ) { 133 ++entries_so_far; 134 135 // Validate the parsed data, if necessary 136 if ( entries[j].validate != (bool (*)(void *))0p ) { 137 if ( !entries[j].validate( entries[j].variable ) ) { 138 delete( kv_pairs ); 139 serr | "Error: config value at key '" | entries[j].key | "' did not pass validation"; 140 throw (Validation_Failure){}; 141 } 142 } 143 144 break; 132 if ( !entries[j].parse( src_value, entries[j].variable ) ) { 133 delete( kv_pairs ); 134 serr | "Error: value '" | src_value | "' for key '" | src_key | "' could not be parsed"; 135 throw (Parse_Failure){}; 145 136 } 146 137 147 delete( kv_pairs ); 148 serr | "Error: value '" | src_value | "' for key '" | src_key | "' could not be parsed"; 149 throw (Parse_Failure){}; 138 // Validate the parsed data, if necessary 139 if ( entries[j].validate != (bool (*)(void *))0p 140 && !entries[j].validate( entries[j].variable ) ) { 141 delete( kv_pairs ); 142 serr | "Error: config value at key '" | entries[j].key | "' did not pass validation"; 143 throw (Validation_Failure){}; 144 } 145 146 ++entries_so_far; 147 148 break; 150 149 } 151 150 }
Note: See TracChangeset
for help on using the changeset viewer.