IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

Was writing the images after dumping the configuration, which meant that images weren't listed in the configuration.

File:
1 edited

Legend:

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

    r27076 r27107  
    5858    // Common code for the death.
    5959    {
    60         psExit exitValue = PS_EXIT_SUCCESS;        // Exit value for program
    61         psErrorCode errorCode = psErrorCodeLast(); // Error code
    62         if (errorCode != PS_ERR_NONE) {
    63             psErrorStackPrint(stderr, "Unable to perform stack.");
    64             switch (errorCode) {
    65               case PPSTACK_ERR_UNKNOWN:
    66               case PS_ERR_UNKNOWN:
    67                 exitValue = PS_EXIT_UNKNOWN_ERROR;
    68                 break;
    69               case PS_ERR_IO:
    70               case PS_ERR_DB_CLIENT:
    71               case PS_ERR_DB_SERVER:
    72               case PS_ERR_BAD_FITS:
    73               case PS_ERR_OS_CALL_FAILED:
    74               case PPSTACK_ERR_IO:
    75                 exitValue = PS_EXIT_SYS_ERROR;
    76                 break;
    77               case PS_ERR_BAD_PARAMETER_VALUE:
    78               case PS_ERR_BAD_PARAMETER_TYPE:
    79               case PS_ERR_BAD_PARAMETER_NULL:
    80               case PS_ERR_BAD_PARAMETER_SIZE:
    81               case PPSTACK_ERR_ARGUMENTS:
    82               case PPSTACK_ERR_CONFIG:
    83                 exitValue = PS_EXIT_CONFIG_ERROR;
    84                 break;
    85               case PPSTACK_ERR_PSF:
    86               case PPSTACK_ERR_REJECTED:
    87               case PPSTACK_ERR_DATA:
    88                 exitValue = PS_EXIT_DATA_ERROR;
    89                 break;
    90               case PS_ERR_UNEXPECTED_NULL:
    91               case PS_ERR_PROGRAMMING:
    92               case PPSTACK_ERR_NOT_IMPLEMENTED:
    93               case PPSTACK_ERR_PROG:
    94               default:
    95                 // It's a programming error if we're not dealing with the error correctly
    96                 exitValue = PS_EXIT_PROG_ERROR;
    97                 break;
    98             }
    99         }
     60        psExit exitValue = ppStackExitCode(); // Exit code
    10061
    10162        // Ensure everything closes
     
    10768            if (!ppStackFilesIterateUp(config)) {
    10869                psErrorStackPrint(stderr, "Unable to close files.");
     70                if (exitValue == PS_EXIT_SUCCESS) {
     71                    exitValue = ppStackExitCode();
     72                }
     73            }
     74        }
     75
     76        // Dump configuration
     77        bool mdok;                                                                    // Status of MD lookup
     78        psString dump = psMetadataLookupStr(&mdok, config->arguments, "DUMP_CONFIG"); // File for config
     79        if (dump && !pmConfigDump(config, dump)) {
     80            psErrorStackPrint(stderr, "Unable to dump configuration.");
     81            if (exitValue == PS_EXIT_SUCCESS) {
     82                exitValue = ppStackExitCode();
    10983            }
    11084        }
Note: See TracChangeset for help on using the changeset viewer.