12 ms·
It's really neat, I like it! It would be nice to catch exceptions, they are currently blowing up, i.e.: ``` ncaught PythonError: Traceback (most recent call las
by hackan 4y ago
It's really neat, I like it! It would be nice to catch exceptions, they are currently blowing up, i.e.:
```
ncaught PythonError: Traceback (most recent call last):
File "/lib/python3.11/_pyodide/_base.py", line 460, in eval_code
.run(globals, locals)
^^^^^^^^^^^^^^^^^^^^
File "/lib/python3.11/_pyodide/_base.py", line 306, in run
coroutine = eval(self.code, globals, locals)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<exec>", line 7, in <module>
File "<exec>", line 5, in feet_to_meters
ZeroDivisionError: division by zero
```
- pamelafox 4y agoAh yes, good point, I’ll add exception handling. Thanks!
- pamelafox 4y agoFixed, just needed a try/catch: https://github.com/pamelafox/dis-this/pull/5/files#diff-27653c212e1cfe533e4eb2f7d0d3f89604c9de48a09583b4cbbbcbd08a07da79R33 https://github.com/pamelafox/dis-this/pull/5/files#diff-2765...