diff options
author | Robb Romans <robb@linux.vnet.ibm.com> | 2009-09-08 15:15:37 -0500 |
---|---|---|
committer | Robb Romans <robb@linux.vnet.ibm.com> | 2009-09-09 15:24:48 -0500 |
commit | 6d8f08ed5132777fe772555ab7870d080c745671 (patch) | |
tree | 7d1fc5e1e80e2c32c758a7fe6bdab6a1a17e6b00 /doc | |
parent | 9084f0736c3c53e4210409fb000530fc12c03825 (diff) | |
download | systemtap-steved-6d8f08ed5132777fe772555ab7870d080c745671.tar.gz systemtap-steved-6d8f08ed5132777fe772555ab7870d080c745671.tar.xz systemtap-steved-6d8f08ed5132777fe772555ab7870d080c745671.zip |
Add error probe information.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/langref.tex | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/doc/langref.tex b/doc/langref.tex index 3d08234d..eb5393bd 100644 --- a/doc/langref.tex +++ b/doc/langref.tex @@ -1031,14 +1031,33 @@ of an \texttt{exit} function call, or an interruption from the user. In the case of an shutdown triggered by error, \texttt{end} probes are not run. -\subsubsection{begin and end probe sequence} -\index{sequence} -\texttt{begin} and \texttt{end} probes are specified with an optional sequence -number that controls the order in which they are run. If no sequence number -is provided, the sequence number defaults to zero and probes are run in the -order that they occur in the script file. Sequence numbers may be either -positive or negative, and are especially useful for tapset writers who want -to do initialization in a \texttt{begin} probe. The following are examples. +\subsubsection{error} +\index{error} +The \emph{error} probe point is similar to the end +probe, except the probe handler runs when the session ends if an error +occurred. In this case, an \texttt{end} probe is skipped, but each +\texttt{error} probe is still attempted. You can use an +\texttt{error} probe to clean up or perform a final action on script +termination. + +Here is a simple example: +\begin{vindent} +\begin{verbatim} +probe error { println ("Oops, errors occurred. Here's a report anyway.") + foreach (coin in mint) { println (coin) } } +\end{verbatim} +\end{vindent} + + +\subsubsection{begin, end, and error probe sequence} +\index{probe sequence} +\texttt{begin}, \texttt{end}, and \texttt{error} probes can be +specified with an optional sequence number that controls the order in +which they are run. If no sequence number is provided, the sequence +number defaults to zero and probes are run in the order that they +occur in the script file. Sequence numbers may be either positive or +negative, and are especially useful for tapset writers who want to do +initialization in a \texttt{begin} probe. The following are examples. \begin{vindent} \begin{verbatim} |