Bypass Python exmples not supported by -builtin
Builtin classes as exceptions not supported, so don't run these aspects of the examples when using -builtin.
This commit is contained in:
parent
da394fae80
commit
808d4b4798
4 changed files with 34 additions and 6 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue