Changeset 3927
- Timestamp:
- May 13, 2005, 11:48:05 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/doc/pslib/psLibSDRS.tex (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/pslib/psLibSDRS.tex
r3925 r3927 1 %%% $Id: psLibSDRS.tex,v 1.21 4 2005-05-13 21:38:44price Exp $1 %%% $Id: psLibSDRS.tex,v 1.215 2005-05-13 21:48:05 price Exp $ 2 2 \documentclass[panstarrs,spec]{panstarrs} 3 3 … … 1046 1046 returns the error code. 1047 1047 \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}. 1048 psErrorCode 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 1054 number and function name to be inputted to a private function, 1055 \code{p_psError}. The \code{code} is an enumerated type which lists 1056 the 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 1059 that the error was set initially at this location, and if \code{FALSE} 1060 specifies that an error was passed to this location. Raising new 1061 error 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 1064 the concatenation of the file name and the line number, separated by a 1065 colon. The result of a call to \code{psError} must be to push an 1066 error onto a stack; this stack is cleared if \code{new} is true, or by 1067 a call to \code{psErrorClear}. 1067 1068 1068 1069 The errors on the error stack are defined as the following:
Note:
See TracChangeset
for help on using the changeset viewer.
