Open abonie opened 7 years ago
Hi mentors, I am a newbie, would like to contribute to this project. Kindly help me with the first PR. Thanks.
Hi @bhardwajaditya113, this topic is meant for discussing this one particular issue only. I suggest reading this: http://pybee.org/contributing/how/first-time/what/batavia/ and posting any further questions here: https://gitter.im/pybee/general.
Possibly related to this issue, if second exception is raised while handling previous exception, e.g.:
try:
raise Exception('1')
except Exception as err:
raise Exception('2')
Batavia will lose / suppress information about the first exception (same behaviour occurs if second exception is thrown this way: raise Exception('2') from err
)
In case of uncaught exception
runAsPython
's traceback contains line which caused said exception, while runAsJavaScript does not. As a result some test cases that should raise an exception fail showing diff like this:(this particular traceback comes from this test case https://github.com/abonie/batavia/blob/master/tests/builtins/test_next.py#L29 on my fork, once you remove
@expectedFailure
)I believe this is not expected behaviour. I am not sure though which version should be correct. If this code was run line-by-line by CPython interpreter, there would be no additional line, however afaik
runAsPython
puts code to be executed in a filetest.py
and runs it withpython test.py
which results in slightly different traceback (i.e. said extra information showing line that caused exception)