IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 5, 2007, 9:36:41 AM (19 years ago)
Author:
eugene
Message:

improving the error handling: detect data vs config errors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStats/src/ppStatsSetupFromArgs.c

    r13181 r13640  
    151151
    152152    // Open the input file, determine the camera
     153    int result = PS_EXIT_UNKNOWN_ERROR;
    153154    {
    154155        psString resolved = pmConfigConvertFilename(inName, config, false); // Resolved filename
     
    157158            psError(PS_ERR_IO, false, "Unable to open input file %s\n", resolved);
    158159            psFree(resolved);
     160            result = PS_EXIT_DATA_ERROR;
    159161            goto die;
    160162        }
     
    166168            psError(PS_ERR_UNKNOWN, false, "Unable to determine camera format for %s\n", inName);
    167169            psFree(header);
     170            result = PS_EXIT_DATA_ERROR;
    168171            goto die;
    169172        }
     
    173176            psFree(header);
    174177            psFree(format);
     178            result = PS_EXIT_CONFIG_ERROR;
    175179            goto die;
    176180        }
     
    180184        if (!view) {
    181185            psError(PS_ERR_UNKNOWN, false, "Unable to add input file %s to FPA.\n", inName);
     186            result = PS_EXIT_CONFIG_ERROR;
    182187            goto die;
    183188        }
     
    206211    pmConfigDone();
    207212    psLibFinalize();
    208     exit(EXIT_FAILURE);
    209 }
     213    exit(result);
     214}
Note: See TracChangeset for help on using the changeset viewer.