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

Separate program and user errors #33

Open
komninoschatzipapas opened this issue Aug 7, 2020 · 0 comments
Open

Separate program and user errors #33

komninoschatzipapas opened this issue Aug 7, 2020 · 0 comments

Comments

@komninoschatzipapas
Copy link
Owner

There are two kinds of errors:

  1. User errors: Thrown when a user(programmer) provides invalid code. For example, forgetting a semi colon between statements.
  2. Program errors: Thrown when something in the actual interpreter program goes wrong. For example reaching a clause that shouldn't be reached.

In the current implementation there is no separation between these two kinds of errors. For user errors, a PSIError is always thrown but for program errors, sometimes a PSIError and sometimes an Error is thrown.

Modify the error module and related modules so a PSIError can always be thrown and add separation.

Also modify the psi module so correct error messages are displayed.

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

1 participant