IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 18, 2010, 6:42:01 PM (16 years ago)
Author:
Paul Price
Message:

Reworked ppStack to be better about error codes and their translation to exit codes.

Location:
trunk/ppStack/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src

    • Property svn:ignore
      •  

        old new  
        1010stamp-h1
        1111ppStackVersionDefinitions.h
         12ppStackErrorCodes.c
         13ppStackErrorCodes.h
  • trunk/ppStack/src/ppStackArguments.c

    r26078 r27004  
    4343        value = psMetadataLookup##TYPE(&mdok, recipe, RECIPENAME); \
    4444        if (!mdok) { \
    45             psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unable to find %s in recipe %s", \
     45            psError(PPSTACK_ERR_CONFIG, true, "Unable to find %s in recipe %s", \
    4646                RECIPENAME, PPSTACK_RECIPE); \
    4747            goto ERROR; \
     
    5858        value = psMetadataLookup##TYPE(&mdok, recipe, RECIPENAME); \
    5959        if (!mdok) { \
    60             psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unable to find %s in recipe %s", \
     60            psError(PPSTACK_ERR_CONFIG, true, "Unable to find %s in recipe %s", \
    6161                RECIPENAME, PPSTACK_RECIPE); \
    6262            goto ERROR; \
     
    7373        name = psMetadataLookupStr(NULL, recipe, RECIPENAME); \
    7474        if (!name) { \
    75             psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unable to find %s in recipe %s", \
    76                 RECIPENAME, PPSTACK_RECIPE); \
     75            psError(PPSTACK_ERR_CONFIG, true, "Unable to find %s in recipe %s", \
     76                    RECIPENAME, PPSTACK_RECIPE);                        \
    7777            goto ERROR; \
    7878        } \
     
    108108        value = psMetadataLookupStr(NULL, recipe, mdName);
    109109        if (!value) {
    110             psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unable to find %s in recipe %s",
     110            psError(PPSTACK_ERR_CONFIG, true, "Unable to find %s in recipe %s",
    111111                    mdName, PPSTACK_RECIPE);
    112112            return false;
     
    207207        psMetadata *inputs = psMetadataConfigRead(NULL, &numBad, argv[argNum], false); // Input file info
    208208        if (!inputs || numBad > 0) {
    209             psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Unable to cleanly read MDC file with inputs.");
     209            psError(PPSTACK_ERR_ARGUMENTS, false, "Unable to cleanly read MDC file with inputs.");
    210210            return false;
    211211        }
     
    229229    int numThreads = psMetadataLookupS32(NULL, arguments, "-threads"); // Number of threads
    230230    if (numThreads > 0 && !psThreadPoolInit(numThreads)) {
    231         psError(PS_ERR_UNKNOWN, false, "Unable to setup %d threads", numThreads);
     231        psError(PPSTACK_ERR_ARGUMENTS, false, "Unable to setup %d threads", numThreads);
    232232        return false;
    233233    }
     
    247247    psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSTACK_RECIPE); // Recipe
    248248    if (!recipe) {
    249         psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find recipe %s", PPSTACK_RECIPE);
     249        psError(PPSTACK_ERR_CONFIG, false, "Unable to find recipe %s", PPSTACK_RECIPE);
    250250        goto ERROR;
    251251    }
Note: See TracChangeset for help on using the changeset viewer.