| Line 17... |
Line 17... |
| 17 |
an error action.
|
17 |
an error action.
|
| 18 |
|
18 |
|
| 19 |
\code{geterrmessage} gives the last error message.
|
19 |
\code{geterrmessage} gives the last error message.
|
| 20 |
}
|
20 |
}
|
| 21 |
\details{
|
21 |
\details{
|
| 22 |
|
- |
|
| 23 |
The error action is controlled by error handlers established within
|
22 |
The error action is controlled by error handlers established within
|
| 24 |
the executing code and by the current default error handler set by
|
23 |
the executing code and by the current default error handler set by
|
| 25 |
\code{options(error=)}. The error is first signaled as if using
|
24 |
\code{options(error=)}. The error is first signaled as if using
|
| 26 |
\code{signalCondition}. If there are no handlers or if all handlers
|
25 |
\code{\link{signalCondition}()}. If there are no handlers or if all handlers
|
| 27 |
return, then the error message is printed (if
|
26 |
return, then the error message is printed (if
|
| 28 |
\code{options("show.error.messages")} is true) and the default error
|
27 |
\code{options("show.error.messages")} is true) and the default error
|
| 29 |
handler is used. The default behaviour (the \code{NULL}
|
28 |
handler is used. The default behaviour (the \code{NULL}
|
| 30 |
error-handler) in interactive use is to return to the top level
|
29 |
error-handler) in interactive use is to return to the top level
|
| 31 |
prompt or the top level browser, and in non-interactive use to
|
30 |
prompt or the top level browser, and in non-interactive use to
|
| 32 |
(effectively) call \code{\link{q}("no", status=1, runLast=FALSE}).
|
31 |
(effectively) call \code{\link{q}("no", status=1, runLast=FALSE}).
|
| 33 |
The default handler stores the error message in a buffer; it can be
|
32 |
The default handler stores the error message in a buffer; it can be
|
| 34 |
retrieved by \code{geterrmessage}. It also stores a trace of the
|
33 |
retrieved by \code{geterrmessage()}. It also stores a trace of
|
| 35 |
call stack that can be retrieved by code{traceback}.
|
34 |
the call stack that can be retrieved by \code{\link{traceback}()}.
|
| 36 |
|
35 |
|
| 37 |
Errors will be truncated to \code{getOption("warning.length")}
|
36 |
Errors will be truncated to \code{getOption("warning.length")}
|
| 38 |
characters, default 1000.
|
37 |
characters, default 1000.
|
| 39 |
}
|
38 |
}
|
| 40 |
\value{
|
39 |
\value{
|