IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 17, 2010, 5:36:13 PM (16 years ago)
Author:
Paul Price
Message:

Being better about errors and their mapping to exit codes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSub/src/ppSubThreshold.c

    r26899 r26982  
    4545    psRandom *rng = psRandomAlloc(PS_RANDOM_TAUS);                               // Random number generator
    4646    if (!psImageBackground(stats, NULL, subImage, subMask, maskIgnore, rng)) {
    47         psError(PS_ERR_UNKNOWN, false, "Unable to determine threshold.");
     47        psError(PPSUB_ERR_DATA, false, "Unable to determine threshold.");
    4848        psFree(rng);
    4949        psFree(stats);
     
    9797    pmReadout *in = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV"); // Input image
    9898    if (!in) {
    99         psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find readout.");
     99        psError(PPSUB_ERR_UNKNOWN, false, "Unable to find readout.");
    100100        return false;
    101101    }
     
    103103    pmReadout *ref = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV"); // Reference image
    104104    if (!ref) {
    105         psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find readout.");
     105        psError(PPSUB_ERR_UNKNOWN, false, "Unable to find readout.");
    106106        return false;
    107107    }
     
    114114        psRegion *region = regItem->data.V; // Region of interest
    115115        if (!lowThreshold(in, thresh, maskVal, maskThresh, region, "input convolved image")) {
    116             psError(PS_ERR_UNKNOWN, false, "Unable to threshold input image.");
     116            psError(psErrorCodeLast(), false, "Unable to threshold input image.");
    117117            return false;
    118118        }
    119119        if (!lowThreshold(ref, thresh, maskVal, maskThresh, region, "reference convolved image")) {
    120             psError(PS_ERR_UNKNOWN, false, "Unable to threshold input image.");
     120            psError(psErrorCodeLast(), false, "Unable to threshold input image.");
    121121            return false;
    122122        }
Note: See TracChangeset for help on using the changeset viewer.