diff options
| -rw-r--r-- | lldb/examples/python/cmdtemplate.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lldb/examples/python/cmdtemplate.py b/lldb/examples/python/cmdtemplate.py index dc8e6b10664..9936d0e68e2 100644 --- a/lldb/examples/python/cmdtemplate.py +++ b/lldb/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 |

