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

Improve function argument sort error messages #37

Open
mmatsa opened this issue Feb 2, 2017 · 0 comments
Open

Improve function argument sort error messages #37

mmatsa opened this issue Feb 2, 2017 · 0 comments

Comments

@mmatsa
Copy link
Contributor

mmatsa commented Feb 2, 2017

Here is a current error message:

Infer rule My-Rule-Name
Error: undefined enumeration value MY_CONSTRUCTOR in type MY_SORT
problem occurred while running the Tosca system

Lionel asked for an issue with a recommendation for the error message.
I'm not sure, but perhaps the error could look more like this:

Infer rule My-Rule-Name
Error: In rule My-Rule-Name at File.tsc line 210 there is a call to rule Other-Rule-Name where argument #1 expects type MY_SORT but instead is passed an argument MY_CONSTRUCTOR.
problem occurred while running the Tosca system

I don't love that verbiage, but it includes more standard compiler error message components such as:

  • Function in which the error occurs
  • File name and line number where the error occurs
  • Name of the rule being called that is causing the problem
  • Which argument there is the problem
  • What is the expected type and what is instead being found
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

1 participant