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/ppStackThread.c

    r26076 r27004  
    102102            (FITS)->data[INDEX] = psFitsOpen(resolved, "r");                            \
    103103            if (!(FITS)->data[INDEX]) { \
    104                 psError(PS_ERR_IO, false, "Unable to open file %s", (char*)(NAMES)->data[INDEX]); \
     104                psError(PPSTACK_ERR_IO, false, "Unable to open file %s", (char*)(NAMES)->data[INDEX]); \
    105105                psFree(resolved); \
    106106                return NULL; \
     
    152152    psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSTACK_RECIPE); // Recipe
    153153    if (!recipe) {
    154         psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find recipe %s", PPSTACK_RECIPE);
     154        psError(PPSTACK_ERR_CONFIG, false, "Unable to find recipe %s", PPSTACK_RECIPE);
    155155        return NULL;
    156156    }
    157157    int rows = psMetadataLookupS32(NULL, recipe, "ROWS"); // Number of rows to read per chunk
    158158    if (rows <= 0) {
    159         psError(PS_ERR_BAD_PARAMETER_VALUE, false, "ROWS is not set in the recipe.");
     159        psError(PPSTACK_ERR_CONFIG, false, "ROWS is not set in the recipe.");
    160160        return NULL;
    161161    }
     
    204204                    keepReading = true;
    205205                    if (!pmReadoutReadChunk(ro, imageFits, 0, NULL, rows, overlap, config)) {
    206                         psError(PS_ERR_IO, false, "Unable to read chunk %d for file PPSTACK.INPUT %d",
     206                        psError(PPSTACK_ERR_IO, false,
     207                                "Unable to read chunk %d for file PPSTACK.INPUT %d",
    207208                                numChunk, i);
    208209                        *status = false;
     
    214215                    keepReading = true;
    215216                    if (!pmReadoutReadChunkMask(ro, maskFits, 0, NULL, rows, overlap, config)) {
    216                         psError(PS_ERR_IO, false, "Unable to read chunk %d for file PPSTACK.INPUT.MASK %d",
     217                        psError(PPSTACK_ERR_IO, false,
     218                                "Unable to read chunk %d for file PPSTACK.INPUT.MASK %d",
    217219                                numChunk, i);
    218220                        *status = false;
     
    224226                    keepReading = true;
    225227                    if (!pmReadoutReadChunkVariance(ro, varianceFits, 0, NULL, rows, overlap, config)) {
    226                         psError(PS_ERR_IO, false,
     228                        psError(PPSTACK_ERR_IO, false,
    227229                                "Unable to read chunk %d for file PPSTACK.INPUT.VARIANCE %d",
    228230                                numChunk, i);
Note: See TracChangeset for help on using the changeset viewer.