Issue737978
Created on 2003-05-15.00:36:24 by pedronis, last changed 2015-01-14.17:09:23 by zyasoft.
msg842 (view) |
Author: Samuele Pedroni (pedronis) |
Date: 2003-05-15.00:36:24 |
|
consider
>>> from java.io import IOException as IOExc
>>> try:
... raise IOExc
... except IOError,e:
... try:
... raise e
... except IOExc,f:
... print "IOExc as IOExc"
... assert isinstance(f,IOExc)
... assert isinstance(e,IOError),"broken spell"
...
IOExc as IOExc
Traceback (innermost last):
File "<console>", line 9, in ?
AssertionError: broken spell
>>> try:
... from java.lang import OutOfMemoryError as Boom
... raise Boom
... except MemoryError,e:
... assert isinstance(e,MemoryError),"broken spell"
...
Traceback (innermost last):
File "<console>", line 5, in ?
AssertionError: broken spell
the asserts should hold
[f is e is not so relevant]
|
msg4193 (view) |
Author: Jim Baker (zyasoft) |
Date: 2009-03-08.06:45:15 |
|
This looks like a possible feature for 2.5.1
|
msg8860 (view) |
Author: Jim Baker (zyasoft) |
Date: 2014-07-01.17:53:39 |
|
Let's revisit.
There's current special casing for IOError and MemoryError in PyException#match. However, issubclass/isinstance does not work. Given that we have __subclasshook__ available in 2.7, it's now possible to adapt such errors in PyJavaType.
|
msg9388 (view) |
Author: Jim Baker (zyasoft) |
Date: 2015-01-14.17:09:23 |
|
Nice to have for 2.7.0 given simplicity
|
|
Date |
User |
Action |
Args |
2015-01-14 17:09:23 | zyasoft | set | resolution: remind messages:
+ msg9388 |
2014-07-01 17:53:39 | zyasoft | set | messages:
+ msg8860 versions:
+ Jython 2.7 |
2013-02-26 19:09:48 | fwierzbicki | set | nosy:
+ fwierzbicki |
2012-03-19 21:11:53 | amak | set | nosy:
+ amak |
2009-03-08 06:45:16 | zyasoft | set | nosy:
+ zyasoft messages:
+ msg4193 |
2003-05-15 00:36:24 | pedronis | create | |
|