bartek
2007-03-12 17:07:23 UTC
Hello
I observed a behaviour that I did not expect: a method called from
unittest via portal_activities should raise an exception, but it doesn't
- but activities say they can not execute it, and the test fails with
"tic is looping forever" message. The big question is, what happens to
the exception, and how do the activities know the method failed???
Specifically, the method went like
...
self.log('before edit')
self.edit(**kw)
self.log('after edit')
...
Logs said "before edit", and nothing more. Doing like:
try:
...
self.log('before edit')
self.edit(**kw)
self.log('after edit')
...
except Exception, e:
self.log(e)
raise e
didn't help - still nothing in the logs, but activities failed. I had to
use a crystal ball to figure out what was wrong - turned out that kw
contained an illegal argument. But if so, then an exception should have
been raised - so what happened to it? Was it caught somewhere else?
Needless to say, it is debugging nightmare...
Bartek
I observed a behaviour that I did not expect: a method called from
unittest via portal_activities should raise an exception, but it doesn't
- but activities say they can not execute it, and the test fails with
"tic is looping forever" message. The big question is, what happens to
the exception, and how do the activities know the method failed???
Specifically, the method went like
...
self.log('before edit')
self.edit(**kw)
self.log('after edit')
...
Logs said "before edit", and nothing more. Doing like:
try:
...
self.log('before edit')
self.edit(**kw)
self.log('after edit')
...
except Exception, e:
self.log(e)
raise e
didn't help - still nothing in the logs, but activities failed. I had to
use a crystal ball to figure out what was wrong - turned out that kw
contained an illegal argument. But if so, then an exception should have
been raised - so what happened to it? Was it caught somewhere else?
Needless to say, it is debugging nightmare...
Bartek