diff options
author | Enrico Granata <egranata@apple.com> | 2013-02-25 23:01:08 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2013-02-25 23:01:08 +0000 |
commit | 06bdbafae8ed420d0b9da4a059ef5765e48c7bc3 (patch) | |
tree | ce75cc9a6fae9653c1c8ae10e6b5442f5dd6c7de /examples | |
parent | 06925c994863c17defaa91eb0041dc1f69d2d3eb (diff) | |
download | lldb-06bdbafae8ed420d0b9da4a059ef5765e48c7bc3.tar.gz |
Being explicit about how ignoring optparse's exceptions is not a best principle
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176059 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'examples')
-rw-r--r-- | examples/python/cmdtemplate.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/python/cmdtemplate.py b/examples/python/cmdtemplate.py index dc8e6b106..9936d0e68 100644 --- a/examples/python/cmdtemplate.py +++ b/examples/python/cmdtemplate.py @@ -38,6 +38,8 @@ def ls(debugger, command, result, dict): try: (options, args) = parser.parse_args(command_args) except: + # if you don't handle exceptions, passing an incorrect argument to the OptionParser will cause LLDB to exit + # (courtesy of OptParse dealing with argument errors by throwing SystemExit) result.SetStatus (lldb.eReturnStatusFailed) return |