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

Throw...Catch & better error handling #29

Open
ConorOBrien-Foxx opened this issue Feb 14, 2018 · 9 comments
Open

Throw...Catch & better error handling #29

ConorOBrien-Foxx opened this issue Feb 14, 2018 · 9 comments
Assignees

Comments

@ConorOBrien-Foxx
Copy link
Owner

  1. Decide on syntax for raising and rescuing errors in Attache

  2. Make a better system of errors (perhaps by propagating errors raised upwards until reaching main or a throw-catch)

@somebody1234
Copy link
Contributor

:| still no throw/catch?

@ConorOBrien-Foxx
Copy link
Owner Author

I think there is but error handling is horribly mangled right now

@somebody1234
Copy link
Contributor

It seems that Attache<foo>Error should subclass AtError? Or if it's intentional, why?

@ConorOBrien-Foxx
Copy link
Owner Author

@somebody1234 AtError I think is another vestige.

@somebody1234
Copy link
Contributor

So TryCatch should really be using a Ruby try/catch instead of checking result type now?

@ConorOBrien-Foxx
Copy link
Owner Author

yes. result type was an awful idea

@somebody1234
Copy link
Contributor

somebody1234 commented Mar 1, 2019

Hmm. I guess this might need more examples of code using TryCatch before deciding on anything

@somebody1234
Copy link
Contributor

Might want to have, say, TryCatch[code, SyntaxError->DoSomething[_1]] like many languages have, although really it'd just be sugar for an if/else

@somebody1234
Copy link
Contributor

somebody1234 commented Mar 2, 2019

Also... 1. until reaching main? and 2. Until reaching a throw-catch works since current implementation uses ruby's errors, although there is no stacktrace yet. Do you want a stacktrace? If you do, you might want to store the filename in every token or something.

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

No branches or pull requests

2 participants