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

    r26454 r27004  
    115115    pmFPAview *view = pmFPAviewAlloc(0);// Pointer into FPA hierarchy
    116116    if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) {
     117        psError(PPSTACK_ERR_IO, false, "File checks failed.");
    117118        return NULL;
    118119    }
    119120    view->chip = 0;
    120121    if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) {
     122        psError(PPSTACK_ERR_IO, false, "File checks failed.");
    121123        return NULL;
    122124    }
    123125    view->cell = 0;
    124126    if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) {
     127        psError(PPSTACK_ERR_IO, false, "File checks failed.");
    125128        return NULL;
    126129    }
    127130    view->readout = 0;
    128131    if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) {
     132        psError(PPSTACK_ERR_IO, false, "File checks failed.");
    129133        return NULL;
    130134    }
     
    141145    view->chip = view->cell = view->readout = 0;
    142146    if (!pmFPAfileIOChecks(config, view, PM_FPA_AFTER)) {
     147        psError(PPSTACK_ERR_IO, false, "File checks failed.");
    143148        return false;
    144149    }
    145150    view->readout = -1;
    146151    if (!pmFPAfileIOChecks(config, view, PM_FPA_AFTER)) {
     152        psError(PPSTACK_ERR_IO, false, "File checks failed.");
    147153        return false;
    148154    }
    149155    view->cell = -1;
    150156    if (!pmFPAfileIOChecks(config, view, PM_FPA_AFTER)) {
     157        psError(PPSTACK_ERR_IO, false, "File checks failed.");
    151158        return false;
    152159    }
    153160    view->chip = -1;
    154161    if (!pmFPAfileIOChecks(config, view, PM_FPA_AFTER)) {
     162        psError(PPSTACK_ERR_IO, false, "File checks failed.");
    155163        return false;
    156164    }
     
    172180    psFits *fits = psFitsOpen(resolved, "w");
    173181    if (!fits) {
    174         psError(PS_ERR_IO, false, "Unable to open FITS file %s to write image.", resolved);
     182        psError(PPSTACK_ERR_IO, false, "Unable to open FITS file %s to write image.", resolved);
    175183        psFree(resolved);
    176184        return false;
    177185    }
    178186    if (!psFitsWriteImage(fits, header, image, 0, NULL)) {
    179         psError(PS_ERR_IO, false, "Unable to write FITS image %s.", resolved);
     187        psError(PPSTACK_ERR_IO, false, "Unable to write FITS image %s.", resolved);
    180188        psFitsClose(fits);
    181189        psFree(resolved);
     
    183191    }
    184192    if (!psFitsClose(fits)) {
    185         psError(PS_ERR_IO, false, "Unable to close FITS image %s.", resolved);
     193        psError(PPSTACK_ERR_IO, false, "Unable to close FITS image %s.", resolved);
    186194        psFree(resolved);
    187195        return false;
Note: See TracChangeset for help on using the changeset viewer.