lpython
lpython copied to clipboard
`TypeError` does not print the message
% 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.
@Shaikh-Ubaid this bug exists for all the builtin exceptions like ValueError, ZeroDivisionError, etc.