[PATCH doc/langref.tex] Add error probe information

Robb Romans robb@linux.vnet.ibm.com
Thu Sep 3 22:20:00 GMT 2009


Please review, thanks.


Signed-off-by: Robb Romans <robb@linux.vnet.ibm.com>
---
  doc/langref.tex |   18 ++++++++++++++++++
  1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/doc/langref.tex b/doc/langref.tex
index 99827e3..8b617b8 100644
--- a/doc/langref.tex
+++ b/doc/langref.tex
@@ -1031,6 +1031,24 @@ 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{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. You can also numerically parametrize an \texttt{error}
+probe to set a sequence.
+
+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 and end probe sequence}
  \index{sequence}
  \texttt{begin} and \texttt{end} probes are specified with an optional sequence
-- 
1.6.0.4


-- 
Robb Romans
IBM LTC Information Development
robb@linux.vnet.ibm.com



More information about the Systemtap mailing list