[Mochi] No exception handling

Ritesh Saini prideofelites at gmail.com
Tue Apr 2 09:51:31 EDT 2019


There are exceptions:

>>> 1 / 0
Traceback (most recent call last):
  ... site-packages/mochi/core/main.py", line 120, in interact
    eval_tokens(tokens)
  .../site-packages/mochi/core/builtins.py", line 1008, in eval_tokens
    exec(code, global_env)
  File "<string>", line 1, in <module>
ZeroDivisionError: division by zero
But there seems to be no way to catch them:

>>> try:
...     1 / 0
... except:
...     print('got it')
... 
ParsingError: file=<string> lineno=3 colno=7
How would an exception in Mochi be handled?

Regards

https://www.digitalkube.com/elegant-themes-coupon/ <https://www.digitalkube.com/elegant-themes-coupon/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/mochi/attachments/20190402/7e6b22b1/attachment.html>


More information about the Mochi mailing list