IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 15, 2007, 3:59:13 PM (19 years ago)
Author:
jhoblitt
Message:

properly handle p3toolConfig() errors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/camtool.c

    r11735 r11844  
    4848
    4949    pxConfig *config = p3toolConfig(NULL, argc, argv);
     50    if (!config) {
     51        psError(PXTOOLS_ERR_CONFIG, false, "failed to configure");
     52        goto FAIL;
     53    }
    5054
    5155    switch (config->mode) {
     
    6973
    7074FAIL:
     75    psErrorStackPrint(stderr, "\n");
     76    int exit_status = pxerrorGetExitStatus();
     77
    7178    psFree(config);
    7279    pmConfigDone();
    73     psErrorStackPrint(stderr, "\n");
    7480    psLibFinalize();
    7581
    76     exit(EXIT_FAILURE);
     82    exit(exit_status);
    7783}
    7884
Note: See TracChangeset for help on using the changeset viewer.