dispy icon indicating copy to clipboard operation
dispy copied to clipboard

A failure in job-callback is ignored

Open UnitedMarsupials-zz opened this issue 7 years ago • 3 comments

Any exception thrown by the job's call-back is silently ignored (at least, in 4.9.1) and that's not right. The execution simply stops on that line of the callback, with nothing written to the log about it...

The invocation of the callback should itself be under try: and any exceptions thrown output into the log -- or to sys.stderr. Maybe even re-raised after that...

UnitedMarsupials-zz avatar Nov 06 '18 21:11 UnitedMarsupials-zz

Callbacks are indeed called in a try / except block but errors are logged at debug level, so that may be why you didn't see the error message. However, even otherwise, that shouldn't prompt you to say "that's not right"; often these are design / implementation choices that have pros and cons. What is "right" in your case may not be good in another case. For example, if the errors were logged at "warning" level and every time callback generated traceback (which can be quite voluminous in some cases), the logging can be a problem.

pgiri avatar Nov 10 '18 16:11 pgiri

Something must be wrong with that logging, because I always use DEBUG and never see the errors from the callback, unless I have my own try/except...

if the errors were logged at "warning" level

Is not it, kind of, self-evident, that errors should be logged at error-level, actually?

UnitedMarsupials-zz avatar Nov 10 '18 21:11 UnitedMarsupials-zz

Your arguments seem to suggest an agenda that is not conducive for discussion. I really have no time or patience with this. If you have questions, ask them. Or discuss technical matters. Subjective opinions, changes as you want them (even after helpful explanation / documentation) are not helpful and from now on I will just ignore them.

pgiri avatar Nov 10 '18 21:11 pgiri