Changeset 12915
- Timestamp:
- Apr 18, 2007, 4:10:03 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/config/pmConfig.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/config/pmConfig.c
r12906 r12915 4 4 * @author EAM (IfA) 5 5 * 6 * @version $Revision: 1.8 8$ $Name: not supported by cvs2svn $7 * @date $Date: 2007-04-1 8 22:42:33 $6 * @version $Revision: 1.89 $ $Name: not supported by cvs2svn $ 7 * @date $Date: 2007-04-19 02:10:03 $ 8 8 * 9 9 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 246 246 } 247 247 if (item->type != PS_DATA_STRING) { 248 psError(PS_ERR_BAD_PARAMETER_TYPE, true, "Element %s in %s metadata is not of type STR.\n",249 item->name, description);250 continue;248 psTrace("config", 2, "Element %s in %s metadata is not of type STR.\n", 249 item->name, description); 250 continue; 251 251 } 252 252 … … 254 254 psMetadata *new = NULL; // New metadata 255 255 if (!pmConfigFileRead(&new, item->data.str, item->name)) { 256 psLogMsg("psModules.config", PS_LOG_WARN, "Trouble reading reading %s %s --- "257 "ignored.\n", description, item->name);256 psError(PM_ERR_CONFIG, false, "Trouble reading reading %s %s --- " 257 "ignored.\n", description, item->name); 258 258 psFree(new); 259 psMetadataRemoveKey(source, item->name); // Take it out, so it will not trouble us again 260 continue;259 psFree(iter); 260 return false; 261 261 } 262 262 … … 294 294 295 295 296 pmConfig *pmConfigRead(int *argc, char **argv, c har *defaultRecipe)296 pmConfig *pmConfigRead(int *argc, char **argv, const char *defaultRecipe) 297 297 { 298 298 PS_ASSERT_PTR_NON_NULL(argc, NULL); … … 514 514 } 515 515 516 pmConfigFileRead(&config->camera, cameraFile, "camera"); 516 if (!pmConfigFileRead(&config->camera, cameraFile, "camera")) { 517 psError(PM_ERR_CONFIG, false, "Problem reading %s", cameraFile); 518 psFree(config); 519 return NULL; 520 } 521 517 522 psArgumentRemove(argNum, argc, argv); 518 523 … … 580 585 581 586 // load command-line options of the form -recipe NAME RECIPE 582 pmConfigLoadRecipeArguments( config);587 pmConfigLoadRecipeArguments(argc, argv, config); 583 588 584 589 // read in command-line options to specific recipe values 585 pmConfigLoadRecipeOptions(config, "-D"); 586 pmConfigLoadRecipeOptions(config, "-Di"); 587 pmConfigLoadRecipeOptions(config, "-Df"); 588 pmConfigLoadRecipeOptions(config, "-Db"); 589 590 pmConfigLoadRecipeOptions(argc, argv, config, "-D"); 591 pmConfigLoadRecipeOptions(argc, argv, config, "-Di"); 592 pmConfigLoadRecipeOptions(argc, argv, config, "-Df"); 593 pmConfigLoadRecipeOptions(argc, argv, config, "-Db"); 590 594 591 595 // check for values that override DB* keywords
Note:
See TracChangeset
for help on using the changeset viewer.
