This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
Re: [python] Trivial filename check in python/lib/gdb/command/save_breakpoints.py
- From: Tom Tromey <tromey at redhat dot com>
- To: Phil Muldoon <pmuldoon at redhat dot com>
- Cc: Project Archer <archer at sourceware dot org>
- Date: Tue, 13 Jan 2009 11:40:17 -0700
- Subject: Re: [python] Trivial filename check in python/lib/gdb/command/save_breakpoints.py
- References: <496CD107.1000002@redhat.com>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "Phil" == Phil Muldoon <pmuldoon@redhat.com> writes:
Phil> (pg-gdb) save breakpoints
Phil> Traceback (most recent call last):
Phil> File
Phil> "/home/pmuldoon/python/archer/gdb/python/lib/gdb/command/save_breakpoints.py",
Phil> line 45, in invoke
Phil> raise RuntimeError, 'No filename specified'
Phil> RuntimeError: No filename specified
Phil> Error occurred in Python command.
We really ought to add a new exception type so that commands don't
print all this stack trace goo for "ordinary" errors. That is, if a
command throws an exception of that type, we would suppress the stack
trace (unless the user really asked for it somehow).
I guess this brings us back to the bugzilla situation, since
ordinarily I'd just file a bug for this.
Phil> I thought about adding write permissions checks too, but decided
Phil> against it. Can add if needed.
It is better to try the command and then report the failure.
Doing permissions checks in advance is too much of a pain.
This needs a ChangeLog entry, but is otherwise ok to go. Just write
one and check it all in, no need to send another message.
Tom