IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 26, 2010, 3:17:54 PM (16 years ago)
Author:
Paul Price
Message:

Bit more elegant solution.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src/ppStack.c

    r27107 r27108  
    5858    // Common code for the death.
    5959    {
    60         psExit exitValue = ppStackExitCode(); // Exit code
     60        psExit exitValue = ppStackExitCode(PS_EXIT_SUCCESS); // Exit code
    6161
    6262        // Ensure everything closes
     
    6767            ppStackFileActivation(config, PPSTACK_FILES_PHOT, true);
    6868            if (!ppStackFilesIterateUp(config)) {
    69                 psErrorStackPrint(stderr, "Unable to close files.");
    70                 if (exitValue == PS_EXIT_SUCCESS) {
    71                     exitValue = ppStackExitCode();
    72                 }
     69                psError(psErrorCodeLast(), false, "Unable to close files.");
     70                exitValue = ppStackExitCode(exitValue);
    7371            }
    7472        }
     
    7876        psString dump = psMetadataLookupStr(&mdok, config->arguments, "DUMP_CONFIG"); // File for config
    7977        if (dump && !pmConfigDump(config, dump)) {
    80             psErrorStackPrint(stderr, "Unable to dump configuration.");
    81             if (exitValue == PS_EXIT_SUCCESS) {
    82                 exitValue = ppStackExitCode();
    83             }
     78            psError(psErrorCodeLast(), false, "Unable to dump configuration.");
     79            exitValue = ppStackExitCode(exitValue);
    8480        }
    8581
     
    9389        pmVisualClose();
    9490
     91        exitValue = ppStackExitCode(exitValue);
    9592        exit(exitValue);
    9693    }
Note: See TracChangeset for help on using the changeset viewer.