IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3927


Ignore:
Timestamp:
May 13, 2005, 11:48:05 AM (21 years ago)
Author:
Paul Price
Message:

Adding function name to psError to sync with devel.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/pslib/psLibSDRS.tex

    r3925 r3927  
    1 %%% $Id: psLibSDRS.tex,v 1.214 2005-05-13 21:38:44 price Exp $
     1%%% $Id: psLibSDRS.tex,v 1.215 2005-05-13 21:48:05 price Exp $
    22\documentclass[panstarrs,spec]{panstarrs}
    33
     
    10461046returns the error code.
    10471047\begin{verbatim}
    1048 psErrorCode p_psError(const char *file, int lineno, psErrorCode code, bool new, const char *fmt, ...);
    1049 #define psError(code, new, fmt, ...) psError(__FILE__, __LINE__, code, new, fmt, __VA_ARGS__)
    1050 \end{verbatim}
    1051 
    1052 \code{psError} is a macro definition that allows the function and line
    1053 number to be inputted to a private function, \code{p_psError}.  The
    1054 \code{code} is an enumerated type which lists the possible
    1055 \textit{classes} of errors (e.g. \code{PS_ERR_IO}) that \PS{} code can
    1056 generate (see section \ref{psErrorCodes}). The \code{new} argument
    1057 takes a boolean which, if \code{TRUE} specifies that the error was set
    1058 initially at this location, and if \code{FALSE} specifies that an
    1059 error was passed to this location.  Raising new error should clear the
    1060 error stack.  The final required argument, \code{fmt}, is a
    1061 \code{printf}-style format that is passed to \code{psLogMsgV} with
    1062 code \code{PS_LOG_ERROR}, and component equal to the concatenation of
    1063 the file name and the line number, separated by a colon.  The result
    1064 of a call to \code{psError} must be to push an error onto a stack;
    1065 this stack is cleared if \code{new} is true, or by a call to
    1066 \code{psErrorClear}.
     1048psErrorCode p_psError(const char *file, int lineno, const char *func, psErrorCode code, bool new,
     1049                      const char *fmt, ...);
     1050#define psError(code, new, fmt, ...) psError(__FILE__, __LINE__, __func__, code, new, fmt, __VA_ARGS__)
     1051\end{verbatim}
     1052
     1053\code{psError} is a macro definition that allows the filename, line
     1054number and function name to be inputted to a private function,
     1055\code{p_psError}.  The \code{code} is an enumerated type which lists
     1056the possible \textit{classes} of errors (e.g. \code{PS_ERR_IO}) that
     1057\PS{} code can generate (see section \ref{psErrorCodes}). The
     1058\code{new} argument takes a boolean which, if \code{TRUE} specifies
     1059that the error was set initially at this location, and if \code{FALSE}
     1060specifies that an error was passed to this location.  Raising new
     1061error should clear the error stack.  The final required argument,
     1062\code{fmt}, is a \code{printf}-style format that is passed to
     1063\code{psLogMsgV} with code \code{PS_LOG_ERROR}, and component equal to
     1064the concatenation of the file name and the line number, separated by a
     1065colon.  The result of a call to \code{psError} must be to push an
     1066error onto a stack; this stack is cleared if \code{new} is true, or by
     1067a call to \code{psErrorClear}.
    10671068
    10681069The errors on the error stack are defined as the following:
Note: See TracChangeset for help on using the changeset viewer.