Open joernhees opened 9 years ago
actually it seems this only works on one host :-/
I already tried modifying scoop (wherever raises future.exceptionValue
), but i can't find where that value is ever set. In that place it should probably save the current traceback in the exception, maybe as _tb
attribute, so that when the exception is sent back to main, it can re-raise it with that traceback.
also note that you should never use logging.exception(e)
, but instead just call it with a message. The exception will be auto-appended, but handing it to logging.exception
instead of a message can result in an encoding error raise in the exception handling itself, which hides the actual exception: http://stackoverflow.com/a/31141546/1423333
I believe this thread is also related: https://groups.google.com/forum/#!topic/scoop-users/z75AF3n1WBU and proposes an alternative to the decorator you mentioned.
hmm, yes, seems related, but there are a lot of times when you just don't want to put anything on stdout...
also think about nested invocations...
if i put the following code in
test.py
:and then run it with
python -m scoop test.py
it gives me the following output:As you can see the traceback information was swallowed, making it very hard to understand the errors.
Currently i use the following as a workaround, maybe it might make sense to embed this in scoop?
Output: