IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 8, 2006, 1:32:23 PM (20 years ago)
Author:
jhoblitt
Message:

bug #790 - remove psErrorText.h and inline all error codes. all newly inlined error codes are wrapped with the _() macro from future gettextification

Location:
trunk/psLib/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src

    • Property svn:ignore
      •  

        old new  
        1010libpslib.la.temp
        1111config.h.in
        12 psErrorText.h
        1312*.bb
        1413*.bbg
  • trunk/psLib/src/fits/psFitsTable.c

    r7984 r8232  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2006-07-26 03:37:57 $
     9 *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2006-08-08 23:32:23 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    1717#include "string.h"
    1818#include "psError.h"
    19 #include "psErrorText.h"
     19
    2020#include "psImageStructManip.h"
    2121#include "psMemory.h"
     
    4141    if (fits == NULL) {
    4242        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    43                 PS_ERRORTEXT_psFits_NULL);
     43                _("The input psFits object can not NULL."));
    4444        return NULL;
    4545    }
     
    5252        (void)fits_get_errstatus(status, fitsErr);
    5353        psError(PS_ERR_IO, true,
    54                 PS_ERRORTEXT_psFits_GET_HDU_TYPE_FAILED,
     54                _("Could not determine the HDU type. CFITSIO Error: %s"),
    5555                fitsErr);
    5656        return NULL;
     
    5858    if (hdutype != ASCII_TBL && hdutype != BINARY_TBL) {
    5959        psError(PS_ERR_IO, true,
    60                 PS_ERRORTEXT_psFits_NOT_TABLE_TYPE);
     60                _("Current FITS HDU type must be a table."));
    6161        return NULL;
    6262    }
     
    6969        (void)fits_get_errstatus(status, fitsErr);
    7070        psError(PS_ERR_IO, true,
    71                 PS_ERRORTEXT_psFits_GET_TABLE_SIZE_FAILED,
     71                _("Failed to determine the size of the current HDU table. CFITSIO Error: %s"),
    7272                fitsErr);
    7373        return NULL;
     
    7878    if (row < 0 || row >= numRows) {
    7979        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    80                 PS_ERRORTEXT_psFits_ROW_INVALID,
     80                _("Specified row, %d, is not valid for current table of %d rows."),
    8181                row,numRows);
    8282        return NULL;
     
    168168            (void)fits_get_errstatus(status, fitsErr);
    169169            psError(PS_ERR_IO, true,
    170                     PS_ERRORTEXT_psFits_GET_TABLE_ELEMENT,
     170                    _("Failed to retrieve table element (%d,%d). CFITSIO Error: %s"),
    171171                    col,row,fitsErr);
    172172            psFree(data);
     
    187187    if (fits == NULL) {
    188188        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    189                 PS_ERRORTEXT_psFits_NULL);
     189                _("The input psFits object can not NULL."));
    190190        return NULL;
    191191    }
     
    197197        (void)fits_get_errstatus(status, fitsErr);
    198198        psError(PS_ERR_IO, true,
    199                 PS_ERRORTEXT_psFits_GET_HDU_TYPE_FAILED,
     199                _("Could not determine the HDU type. CFITSIO Error: %s"),
    200200                fitsErr);
    201201        return NULL;
     
    203203    if (hdutype != ASCII_TBL && hdutype != BINARY_TBL) {
    204204        psError(PS_ERR_IO, true,
    205                 PS_ERRORTEXT_psFits_NOT_TABLE_TYPE);
     205                _("Current FITS HDU type must be a table."));
    206206        return NULL;
    207207    }
     
    212212        (void)fits_get_errstatus(status, fitsErr);
    213213        psError(PS_ERR_IO, true,
    214                 PS_ERRORTEXT_psFits_FIND_COLUMN,
     214                _("Specified column, %s, was not found. CFITSIO Error: %s"),
    215215                colname, fitsErr);
    216216        return NULL;
     
    227227        (void)fits_get_errstatus(status, fitsErr);
    228228        psError(PS_ERR_IO, true,
    229                 PS_ERRORTEXT_psFits_GET_COLTYPE,
     229                _("Could not determine the datatype of the table column. CFITSIO Error: %s"),
    230230                fitsErr);
    231231        return NULL;
     
    253253        (void)fits_get_errstatus(status, fitsErr);
    254254        psError(PS_ERR_IO, true,
    255                 PS_ERRORTEXT_psFits_TABLE_READ_COL,
     255                _("Failed to read table column. CFITSIO Error: %s"),
    256256                fitsErr);
    257257        return NULL;
     
    269269    if (fits == NULL) {
    270270        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    271                 PS_ERRORTEXT_psFits_NULL);
     271                _("The input psFits object can not NULL."));
    272272        return NULL;
    273273    }
     
    279279        (void)fits_get_errstatus(status, fitsErr);
    280280        psError(PS_ERR_IO, true,
    281                 PS_ERRORTEXT_psFits_GET_HDU_TYPE_FAILED,
     281                _("Could not determine the HDU type. CFITSIO Error: %s"),
    282282                fitsErr);
    283283        return NULL;
     
    285285    if (hdutype != ASCII_TBL && hdutype != BINARY_TBL) {
    286286        psError(PS_ERR_IO, true,
    287                 PS_ERRORTEXT_psFits_NOT_TABLE_TYPE);
     287                _("Current FITS HDU type must be a table."));
    288288        return NULL;
    289289    }
     
    294294        (void)fits_get_errstatus(status, fitsErr);
    295295        psError(PS_ERR_IO, true,
    296                 PS_ERRORTEXT_psFits_FIND_COLUMN,
     296                _("Specified column, %s, was not found. CFITSIO Error: %s"),
    297297                colname, fitsErr);
    298298        return NULL;
     
    313313        (void)fits_get_errstatus(status, fitsErr);
    314314        psError(PS_ERR_IO, true,
    315                 PS_ERRORTEXT_psFits_GET_COLTYPE,
     315                _("Could not determine the datatype of the table column. CFITSIO Error: %s"),
    316316                fitsErr);
    317317        return NULL;
     
    336336        (void)fits_get_errstatus(status, fitsErr);
    337337        psError(PS_ERR_IO, true,
    338                 PS_ERRORTEXT_psFits_TABLE_READ_COL,
     338                _("Failed to read table column. CFITSIO Error: %s"),
    339339                fitsErr);
    340340        return NULL;
     
    351351    if (fits == NULL) {
    352352        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    353                 PS_ERRORTEXT_psFits_NULL);
     353                _("The input psFits object can not NULL."));
    354354        return NULL;
    355355    }
     
    361361        (void)fits_get_errstatus(status, fitsErr);
    362362        psError(PS_ERR_IO, true,
    363                 PS_ERRORTEXT_psFits_GET_HDU_TYPE_FAILED,
     363                _("Could not determine the HDU type. CFITSIO Error: %s"),
    364364                fitsErr);
    365365        return NULL;
     
    367367    if (hdutype != ASCII_TBL && hdutype != BINARY_TBL) {
    368368        psError(PS_ERR_IO, true,
    369                 PS_ERRORTEXT_psFits_NOT_TABLE_TYPE);
     369                _("Current FITS HDU type must be a table."));
    370370        return NULL;
    371371    }
     
    378378        (void)fits_get_errstatus(status, fitsErr);
    379379        psError(PS_ERR_IO, true,
    380                 PS_ERRORTEXT_psFits_GET_TABLE_SIZE_FAILED,
     380                _("Failed to determine the size of the current HDU table. CFITSIO Error: %s"),
    381381                fitsErr);
    382382        return NULL;
     
    488488        // no table data, what can I do?
    489489        psError(PS_ERR_BAD_PARAMETER_SIZE, true,
    490                 PS_ERRORTEXT_psFits_TABLE_EMPTY);
     490                _("Can't create a table without any rows."));
    491491        return false;
    492492    }
     
    731731    if (fits == NULL) {
    732732        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    733                 PS_ERRORTEXT_psFits_NULL);
     733                _("The input psFits object can not NULL."));
    734734        return false;
    735735    }
     
    737737    if (data == NULL) {
    738738        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    739                 PS_ERRORTEXT_psFits_IMAGE_NULL);
     739                _("The input psImage was NULL.  Need a non-NULL psImage for operation to be performed."));
    740740        return false;
    741741    }
     
    747747        (void)fits_get_errstatus(status, fitsErr);
    748748        psError(PS_ERR_IO, true,
    749                 PS_ERRORTEXT_psFits_GET_HDU_TYPE_FAILED,
     749                _("Could not determine the HDU type. CFITSIO Error: %s"),
    750750                fitsErr);
    751751        return false;
     
    753753    if (hdutype != ASCII_TBL && hdutype != BINARY_TBL) {
    754754        psError(PS_ERR_IO, true,
    755                 PS_ERRORTEXT_psFits_NOT_TABLE_TYPE);
     755                _("Current FITS HDU type must be a table."));
    756756        return false;
    757757    }
     
    777777                    (void)fits_get_errstatus(status, fitsErr);
    778778                    psError(PS_ERR_IO, true,
    779                             PS_ERRORTEXT_psFits_WRITE_FAILED,
     779                            _("Could not write data to file. CFITSIO Error: %s"),
    780780                            fitsErr);
    781781                    psFree(iter);
Note: See TracChangeset for help on using the changeset viewer.