-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A macro to allow ignoring exceptions #53
Comments
How would this be accomplished, given Python's exception model? Raising an exception causes an immediate and unconditional stack unwinding. You can arrest the process with |
By internally wrapping every line of hy code inside |
Or somehow modify the base class |
Lines aren't really a unit of Hy syntax, and the mapping between Hy syntax and Python lines is arbitrary. You could try wrapping every form in a
|
Performance isn't an issue compared to debugging by restarting from scratch. Also it is possible to turn this behavior off when deployed. |
Gloriously propose my mod on hy interpreter, though not using any 'macro' based methods, also leaves lots of things to implement in README. |
@James4Ever0 Your repository contains code from Hy, so you need to abide by the terms of Hy's LICENSE and track copyrights to not infringe on the Hy authors' copyrights. This kind of thing is easier to get right if you use GitHub's fork button instead of creating a new repository from scratch. |
License issue fixed: hy_mod |
Thanks. |
For example, running the following code in hy:
Skipping the exception is not possible in hy, currently. However, in clisp, we can do this with commandline
clisp -on-error debug test.lisp
:It offers option to restart on exactly the line of division by zero and does not re-execute the line
(print "val")
, without aborting the whole process.This feature is provided as clisp's command line argument. I wonder if hy interpreter can do the same.
The text was updated successfully, but these errors were encountered: