Open Shaikh-Ubaid opened 6 months ago
% cat examples/expr2.py raise TypeError("Some error") % python examples/expr2.py Traceback (most recent call last): File "/Users/ubaid/Desktop/OpenSource/lpython/examples/expr2.py", line 1, in <module> raise TypeError("Some error") TypeError: Some error % lpython examples/expr2.py ERROR STOP
ASR::ErrorStop has an argument to print the message, so we should put the message during AST->ASR in that appropriate argument.
ASR::ErrorStop
@Shaikh-Ubaid this bug exists for all the builtin exceptions like ValueError, ZeroDivisionError, etc.
ValueError
ZeroDivisionError
ASR::ErrorStop
has an argument to print the message, so we should put the message during AST->ASR in that appropriate argument.