IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 20, 2004, 6:12:37 PM (22 years ago)
Author:
eugene
Message:

substantial API changes based on change to PSLib SDRS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/archive/pslib/include/psError.h

    r611 r753  
    1212
    1313typedef struct {
    14     psErrorCode code;                   // An error code
    15     const char *descrip;                // the associated description
     14    psErrorCode code;                   ///< An error code
     15    const char *descrip;                ///< the associated description
    1616} psErrorDescription;
    1717
    1818typedef struct {
    19     char *name;                         // category of code that caused the error
    20     psErrorCode code;                   // class of error (equivalent to errno)
    21     char *msg;                          // the message associated with the error
     19    char *name;                         ///< category of code that caused the error
     20    psErrorCode code;                   ///< class of error (equivalent to errno)
     21    char *msg;                          ///< the message associated with the error
    2222} psErr;
    23 
    24 typedef enum {
    25     PS_OLD_ERROR = 0,                   ///< This is an old error, and should append to the error stack
    26     PS_NEW_ERROR = 1,                   ///< This is a new error and should clear the error stack
    27 } psErrorStatus;
    2823
    2924/// Prints an error message and doesn't abort; returns code
    3025int psError(const char *name,           ///< Category of code that caused the error
    3126            psErrorCode code,           ///< class of error (equivalent to errno)
    32             psErrorStatus status,       ///< is this a new error?
     27            int new,                    ///< is this a new error?
    3328            const char *fmt,            ///< Format
    34             ...                         ///< Extra arguments to use format
    35     );
     29            ...)                        ///< Extra arguments to use format
     30;
    3631
    3732void p_psErrorRegister(const psErrorDescription *errors, ///< register a set of errors
    38                        int nerror);                    ///< number of errors
     33                       int nerror)      ///< number of errors
     34;
    3935
    40 const psErr *psErrorGet(int which);     // return specified error (or an "error" with code PS_ERR_NONE)
    41 const psErr *psErrorLast(void);         // return last error (or an "error" with code PS_ERR_NONE)
     36///< return specified error (or an "error" with code PS_ERR_NONE)
     37const psErr *psErrorGet(int which);     
    4238
    43 void psErrorClear(void);                ///< Clear the error stack
     39///< return last error (or an "error" with code PS_ERR_NONE)
     40const psErr *psErrorLast(void);         
    4441
    45 const char *psErrorCodeString(psErrorCode code);        ///< return the string associated with the error code
    46 void psErrorStackPrint(FILE *fd, const char *fmt, ...); ///< print the errorstack to this file descriptor
    47 void psErrorVStackPrint(FILE *fd,       //< write to this file descriptor
    48                         const char *fmt,//< format for any header information; may be NULL
    49                         va_list ap);    //< arguments for format
     42///< Clear the error stack
     43void psErrorClear(void);               
     44
     45///< return the string associated with the error code
     46const char *psErrorCodeString(psErrorCode code);       
     47
     48///< print the errorstack to this file descriptor
     49void psErrorStackPrint(FILE *fd,        ///< write to this file descriptor
     50                       const char *fmt, ///< format for any header information; may be NULL
     51                       ...)             ///< arguments for format
     52;       
     53
     54///< print the errorstack to this file descriptor (stdargs version)
     55void psErrorStackPrintV(FILE *fd,       ///< write to this file descriptor
     56                        const char *fmt,///< format for any header information; may be NULL
     57                        va_list ap)     ///< arguments for format
     58;
     59
    5060
    5161#endif
Note: See TracChangeset for help on using the changeset viewer.