IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 4373


Ignore:
Timestamp:
Jun 23, 2005, 4:09:23 PM (21 years ago)
Author:
evanalst
Message:

Update function psDBDumpCols to handle invalid parameters.

Location:
trunk/psLib/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/dataIO/psDB.c

    r4371 r4373  
    1212 *  @author Joshua Hoblitt
    1313 *
    14  *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2005-06-24 01:45:09 $
     14 *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2005-06-24 02:09:23 $
    1616 *
    1717 *  Copyright 2005 Joshua Hoblitt, University of Hawaii
     
    651651    unsigned int    i;
    652652    psPtr           column;
     653
     654    // Verify database object is not null
     655    if(dbh == NULL) {
     656        psError(PS_ERR_UNEXPECTED_NULL,true,PS_ERRORTEXT_psDB_INVALID_PSDB);
     657        return NULL;
     658    }
     659
     660    // Verify table name is not null
     661    if(tableName == NULL) {
     662        psError(PS_ERR_UNEXPECTED_NULL,true,PS_ERRORTEXT_psDB_NULL_TABLE);
     663        return NULL;
     664    }
    653665
    654666    // find column types
  • trunk/psLib/src/dataIO/psFileUtilsErrors.dat

    r4297 r4373  
    5858#
    5959psDB_INVALID_PSDB                      Invalid psDB has been specified.
     60psDB_NULL_TABLE                        NULL table specified.
    6061psDB_FAILED_TO_CONNECT                 Failed to connect to database.  Error: %s
    6162psDB_FAILED_TO_CHANGE                  Failed to change database.  Error: %s
  • trunk/psLib/src/dataIO/psFileUtilsErrors.h

    r4297 r4373  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-06-17 21:33:46 $
     9 *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-06-24 02:09:23 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    7777#define PS_ERRORTEXT_psFits_FITS_Z_SMALL "Current FITS HDU has %d z-planes, but z-plane %d was specified."
    7878#define PS_ERRORTEXT_psDB_INVALID_PSDB "Invalid psDB has been specified."
     79#define PS_ERRORTEXT_psDB_NULL_TABLE "NULL table specified."
    7980#define PS_ERRORTEXT_psDB_FAILED_TO_CONNECT "Failed to connect to database.  Error: %s"
    8081#define PS_ERRORTEXT_psDB_FAILED_TO_CHANGE "Failed to change database.  Error: %s"
  • trunk/psLib/src/db/psDB.c

    r4371 r4373  
    1212 *  @author Joshua Hoblitt
    1313 *
    14  *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2005-06-24 01:45:09 $
     14 *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2005-06-24 02:09:23 $
    1616 *
    1717 *  Copyright 2005 Joshua Hoblitt, University of Hawaii
     
    651651    unsigned int    i;
    652652    psPtr           column;
     653
     654    // Verify database object is not null
     655    if(dbh == NULL) {
     656        psError(PS_ERR_UNEXPECTED_NULL,true,PS_ERRORTEXT_psDB_INVALID_PSDB);
     657        return NULL;
     658    }
     659
     660    // Verify table name is not null
     661    if(tableName == NULL) {
     662        psError(PS_ERR_UNEXPECTED_NULL,true,PS_ERRORTEXT_psDB_NULL_TABLE);
     663        return NULL;
     664    }
    653665
    654666    // find column types
Note: See TracChangeset for help on using the changeset viewer.