Skip to content
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

Exceptions #35

Open
TheLoneWolfling opened this issue Jun 30, 2016 · 1 comment
Open

Exceptions #35

TheLoneWolfling opened this issue Jun 30, 2016 · 1 comment

Comments

@TheLoneWolfling
Copy link
Collaborator

Currently any errors just crash the interpreter, which is... brittle, perhaps is the word.

Do we want exceptions? Or similar methods of recoverable error-checking? If so, how do you want them to work, from an end-user point-of-view?

@incrediblesound
Copy link
Member

This is a good issue to keep open, for now I like that the errors crash the interpreter. On the other hand, caught exceptions are useful tool but I haven't gotten to the point where I need to use them. I'd imagine it would look like this:

(try
   (let z (divide x y))
   (catch error (do
        (print error)
        (let z 0)
    ))
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants