This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On Thu, 3 Sep 2009, Josh Stone wrote:

On 09/03/2009 03:18 PM, Robb Romans wrote:
+\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.

The meaning of the sequence isn't really clear until its described in the next subsection for begin and end probes. Perhaps the error sequence should be moved into that discussion?

It's similar to an end probe, which is why I put it immediately after that probe. If you think it's clearer, I'll move it below "begin and end probe sequence".


Here's a patch for that:


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 3d08234..958e098 100644
--- a/doc/langref.tex
+++ b/doc/langref.tex
@@ -1053,6 +1053,24 @@ The user script \texttt{begin} probe defaults to sequence number zero, so
 the tapset \texttt{begin} probe will run first.


+\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{never} \index{never} The \texttt{never} probe point is defined by the translator to mean \emph{never}. -- 1.6.0.4


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]