IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 21, 2004, 12:30:19 PM (22 years ago)
Author:
desonia
Message:

Changed the image code to the new psErrorMsg error handling specification.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/imageops/psImageConvolve.c

    r1653 r1840  
    55 *  @author Robert DeSonia, MHPCC
    66 *
    7  *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2004-08-28 01:18:28 $
     7 *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2004-09-21 22:30:19 $
    99 *
    1010 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1616#include "psLogMsg.h"
    1717#include "psError.h"
     18
     19#include "psImageErrors.h"
    1820
    1921static void freeKernel(psKernel* ptr);
     
    7678}
    7779
    78 psKernel *psKernelGenerate(const psVector *xShifts, const psVector *yShifts)
     80psKernel* psKernelGenerate(const psVector* xShifts, const psVector* yShifts)
    7981{
    8082    int x = 0;
     
    9193    // got non-NULL vectors?
    9294    if (xShifts == NULL || yShifts == NULL) {
    93         psError(__func__,"Shift vectors can not be NULL.");
     95        psErrorMsg(PS_ERRORNAME_DOMAIN "psKernelGenerate",
     96                   PS_ERR_BAD_PARAMETER_NULL, true,
     97                   PS_ERRORTEXT_psImageConvolve_SHIFT_NULL);
    9498        return NULL;
    9599    }
    96100
     101    // types match?
    97102    if (xShifts->type.type != yShifts->type.type) {
    98         psError(__func__,"Shift vectors can not be different data types.");
     103        char* typeXStr;
     104        char* typeYStr;
     105        PS_TYPE_NAME(typeXStr,xShifts->type.type);
     106        PS_TYPE_NAME(typeYStr,yShifts->type.type);
     107        psErrorMsg(PS_ERRORNAME_DOMAIN "psKernelGenerate",
     108                   PS_ERR_BAD_PARAMETER_TYPE, true,
     109                   PS_ERRORTEXT_psImageConvolve_SHIFT_TYPE_MISMATCH,
     110                   typeXStr, typeYStr);
    99111        return NULL;
    100112    }
     
    158170        KERNEL_GENERATE_CASE(C32);
    159171        KERNEL_GENERATE_CASE(C64);
    160     default:
    161         psError(__func__,"Shift vector datatype not supported.");
     172
     173    default: {
     174            char* typeStr;
     175            PS_TYPE_NAME(typeStr,xShifts->type.type);
     176            psErrorMsg(PS_ERRORNAME_DOMAIN "psKernelGenerate",
     177                       PS_ERR_BAD_PARAMETER_TYPE, true,
     178                       PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,
     179                       typeStr);
     180        }
    162181    }
    163182
Note: See TracChangeset for help on using the changeset viewer.