[Twisted-Python] exception not being trapped with Failure.trap
May 3, 2010
1:46 p.m.
Hello everyone, I'm getting something strange: f.trap(MyException) raises MyException and f.value == MyException evaluates to True as expected, so why isn't it being trapped? Thanks, Gabriel
May 2010
1:59 p.m.
On 05/03/2010 09:46 AM, Gabriel Rossetti wrote:
f.trap(MyException) raises MyException and f.value == MyException evaluates to True as expected, so why isn't it being trapped?
f.value should be an instance of MyException, not the class itself. Perhaps you are doing something like Failure(MyException) when you should be doing Failure(MyException()).
Thanks, Gabriel
-- m. tharp
5378
Age (days ago)
5378
Last active (days ago)
2 comments
2 participants
participants (2)
-
Gabriel Rossetti
-
Michael Tharp