diff options
Diffstat (limited to 'Examples/python/exception/runme.py')
-rw-r--r-- | Examples/python/exception/runme.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/Examples/python/exception/runme.py b/Examples/python/exception/runme.py index 718707861..9e9241194 100644 --- a/Examples/python/exception/runme.py +++ b/Examples/python/exception/runme.py @@ -20,10 +20,17 @@ try: except RuntimeError,e: print e.args[0] -try: - t.hosed() -except example.Exc,e: - print e.code, e.msg +if not example.is_python_builtin(): + try: + t.hosed() + except example.Exc,e: + print e.code, e.msg +else: + try: + t.hosed() + except BaseException,e: + # Throwing builtin classes as exceptions not supported (-builtin option) + print e for i in range(1,4): try: |