IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 14, 2004, 10:01:52 AM (22 years ago)
Author:
desonia
Message:

Updated files in src/collections to use new psError functionality. Also
cleaned up the code where needed, removing unnecessary error conditions,
etc.

Location:
trunk/psLib/src/sysUtils
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sysUtils/psError.c

    r1696 r1807  
    1010 *  @author Eric Van Alst, MHPCC
    1111 *   
    12  *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2004-09-07 19:05:07 $
     12 *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2004-09-14 20:01:52 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
    … …  
    9696    va_list argPtr;             // variable list arguement pointer
    9797
    98     // Get the variable list parameters to pass to logging function
    99     va_start(argPtr, fmt);
    100 
    101     // Call logging function with PS_LOG_ERROR level
    102     psLogMsgV(name, PS_LOG_ERROR, fmt, argPtr);
    103 
    10498    if (new) {
    10599        psErrorClear();
    106100    }
    107101
     102    // Get the variable list parameters to pass to logging function
     103    va_start(argPtr, fmt);
     104
    108105    vsnprintf(errMsg,1024,fmt,argPtr);
    109106    err = psErrAlloc(name,code,errMsg);
    110107    pushErrorStack(err);
     108
     109    // Call logging function with PS_LOG_ERROR level
     110    psLogMsg(name, PS_LOG_ERROR, errMsg);
    111111
    112112    // Clean up stack after variable argument has been used
    … …  
    116116}
    117117
    118 const psErr* psErrorGet(int which)
     118psErr* psErrorGet(int which)
    119119{
    120120    psErr* result;
    … …  
    134134}
    135135
    136 const psErr* psErrorLast(void)
     136psErr* psErrorLast(void)
    137137{
    138138    return psErrorGet(0);
  • trunk/psLib/src/sysUtils/psError.h

    r1783 r1807  
    1212 *  @author Eric Van Alst, MHPCC
    1313 *
    14  *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2004-09-10 23:20:35 $
     14 *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2004-09-14 20:01:52 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
    … …  
    5050 *  @return    Error message object at 'which'
    5151 */
    52 const psErr* psErrorGet(
     52psErr* psErrorGet(
    5353    int which                          ///< position in the error stack. 0 is last error on stack.
    5454);
    … …  
    6161 *  @return psErr*     Reference to last error message on error stack
    6262 */
    63 const psErr* psErrorLast(void);
     63psErr* psErrorLast(void);
    6464
    6565/** Clears the error stack.
  • trunk/psLib/src/sysUtils/psErrorCodes.c

    r1787 r1807  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2004-09-11 00:43:54 $
     9 *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2004-09-14 20:01:52 $
    1111 *
    1212 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
    … …  
    3838            {PS_ERR_MEMORY_DEREF_USAGE,"dereferenced memory still used"},
    3939            {PS_ERR_BAD_PARAMETER_VALUE,"parameter is out-of-range"},
     40            {PS_ERR_BAD_PARAMETER_TYPE,"parameter is of unsupported data-type"},
    4041            {PS_ERR_BAD_PARAMETER_NULL,"parameter is null"},
    41             {PS_ERR_BAD_PARAMETER_LENGTH,"parameter string is too long"},
     42            {PS_ERR_BAD_PARAMETER_SIZE,"size of parameter's data is outside of acceptable range."},
    4243            {PS_ERR_UNEXPECTED_NULL,"unexpected NULL foun"},
    4344            //~End
  • trunk/psLib/src/sysUtils/psErrorCodes.h

    r1787 r1807  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2004-09-11 00:43:54 $
     9 *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2004-09-14 20:01:52 $
    1111 *
    1212 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
    … …  
    4747    PS_ERR_MEMORY_DEREF_USAGE,   ///< dereferenced memory still used
    4848    PS_ERR_BAD_PARAMETER_VALUE,   ///< parameter is out-of-range
     49    PS_ERR_BAD_PARAMETER_TYPE,   ///< parameter is of unsupported data-type
    4950    PS_ERR_BAD_PARAMETER_NULL,   ///< parameter is null
    50     PS_ERR_BAD_PARAMETER_LENGTH,   ///< parameter string is too long
     51    PS_ERR_BAD_PARAMETER_SIZE,   ///< size of parameter's data is outside of acceptable range.
    5152    PS_ERR_UNEXPECTED_NULL,   ///< unexpected NULL foun
    5253    //~End
  • trunk/psLib/src/sysUtils/psLogMsg.c

    r1798 r1807  
    1111 *  @author George Gusciora, MHPCC
    1212 *
    13  *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2004-09-11 03:03:36 $
     13 *  @version $Revision: 1.33 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2004-09-14 20:01:52 $
    1515 *
    1616 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
    … …  
    383383    va_end(ap);
    384384}
     385void psWarning(const char* name, const char* fmt, ...)
     386{
     387    va_list ap;
     388
     389    va_start(ap, fmt);
     390    psLogMsgV(name, PS_LOG_WARN, fmt, ap);
     391    va_end(ap);
     392}
  • trunk/psLib/src/sysUtils/psLogMsg.h

    r1798 r1807  
    1111 *  @author George Gusciora, MHPCC
    1212 *
    13  *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2004-09-11 03:03:36 $
     13 *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2004-09-14 20:01:52 $
    1515 *
    1616 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
    … …  
    9999};
    100100
     101/** Logs a warning message.
     102 *
     103 *  This procedure logs a message to the destination set by a prior
     104 *  call to psLogSetDestination(), This is equivalent to calling
     105 *  psLogMsg with a level of PS_LOG_WARN.
     106 *
     107 */
     108void psWarning(
     109    const char* name,
     110    const char* fmt,
     111    ...
     112);
     113
    101114/// @}
    102115
Note: See TracChangeset for help on using the changeset viewer.