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

Standardize error reporting for definitions #29

Closed
jayconrod opened this issue Dec 30, 2016 · 0 comments
Closed

Standardize error reporting for definitions #29

jayconrod opened this issue Dec 30, 2016 · 0 comments

Comments

@jayconrod
Copy link
Owner

Most compiler errors refer to a specific definition in source code. The location of the definition should be included in the exception if it is known, otherwise NoLoc should be used. The source name should be included if it is known, otherwise the full name should be used.

It doesn't make sense to have this logic in every place where we report an error. Instead, exception classes should have a static factory method to create an exception using a definition and a short message. The source name, name, and location can be taken directly from the definition.

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