Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Phil Muldoon <pmuldoon@redhat.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: [patch][doc] Fix PR python/15613 (make gdb.GdbError formatting consistent with other exceptions
Date: Wed, 18 Sep 2013 20:02:00 -0000	[thread overview]
Message-ID: <523A06E2.1010602@redhat.com> (raw)

This patch addresses PR 15613.  This makes the formatting of
gdb.GdbError more consistent with other exception types documented.

OK?

Cheers,

Phil


2013-09-18  Phil Muldoon  <pmuldoon@redhat.com>

	PR python/15613

	* gdb.texinfo (Exception Handling): Reorganize gdb.Error to be an
	item in a table instead of an findex.

--

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 60d2877..0796e45 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -23631,6 +23631,11 @@ NameError: name 'foo' is not defined
 Python code are converted to Python exceptions.  The type of the
 Python exception depends on the error.
 
+For the exceptions detailed below, your exception handler will see the
+@value{GDBN} error message as its value and the Python call stack
+backtrace at the Python statement closest to where the @value{GDBN}
+error occurred as the traceback.
+
 @ftable @code
 @item gdb.error
 This is the base class for most exceptions generated by @value{GDBN}.
@@ -23649,12 +23654,11 @@ User interrupt (via @kbd{C-c} or by typing @kbd{q} at a pagination
 prompt) is translated to a Python @code{KeyboardInterrupt} exception.
 @end ftable
 
-In all cases, your exception handler will see the @value{GDBN} error
-message as its value and the Python call stack backtrace at the Python
-statement closest to where the @value{GDBN} error occured as the
-traceback.
+Some exceptions types will not trigger a traceback to be printed in
+@value{GDBN}.  The table below details these types of exception.
 
-@findex gdb.GdbError
+@ftable @code
+@item gdb.GdbError
 When implementing @value{GDBN} commands in Python via @code{gdb.Command},
 it is useful to be able to throw an exception that doesn't cause a
 traceback to be printed.  For example, the user may have invoked the
@@ -23677,6 +23681,7 @@ to handle this case.  Example:
 (gdb) hello-world 42
 hello-world takes no arguments
 @end smallexample
+@end ftable
 
 @node Values From Inferior
 @subsubsection Values From Inferior

	


             reply	other threads:[~2013-09-18 20:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-18 20:02 Phil Muldoon [this message]
2013-09-18 20:37 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=523A06E2.1010602@redhat.com \
    --to=pmuldoon@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox