IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 21, 2005, 3:41:30 PM (21 years ago)
Author:
jhoblitt
Message:

add psError() error reporting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/glueforge/templates/psdb/insertfits.tt

    r4340 r4341  
    55    // move to (the first?) extension named  [% namespace FILTER upper %]_TABLE_NAME
    66    if (!psFitsMoveExtName(fits, [% namespace FILTER upper %]_TABLE_NAME)) {
    7         // psError(); something bad happened
     7        psError(PS_ERR_UNKNOWN, true, "failed to find FITS extension %s", [% namespace FILTER upper %]_TABLE_NAME);
    88        return false;
    99    }
     
    1111    // check HDU type
    1212    if (psFitsGetExtType(fits) != PS_FITS_TYPE_BINARY_TABLE)  {
    13         // psError(); something bad happened
     13        psError(PS_ERR_UNKNOWN, true, "FITS HDU type is not PS_FITS_TYPE_BINARY_TABLE");
    1414        return false;
    1515    }
     
    1818    rowSet = psFitsReadTable(fits);
    1919    if (!rowSet) {
    20         // psError(); something bad happened
     20        psError(PS_ERR_UNKNOWN, true, "FITS read error or FITS table is empty");
    2121        psFree(rowSet);
    2222        return false;
     
    2424
    2525    if (!psDBInsertRows(dbh, [% namespace FILTER upper %]_TABLE_NAME, rowSet)) {
    26         // psError(); something bad happened
     26        psError(PS_ERR_UNKNOWN, false, "databse insert failed");
    2727        psFree(rowSet);
    2828        return false;
Note: See TracChangeset for help on using the changeset viewer.