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

Issue codes for explicit failures #58

Open
rolve opened this issue Sep 29, 2015 · 2 comments
Open

Issue codes for explicit failures #58

rolve opened this issue Sep 29, 2015 · 2 comments

Comments

@rolve
Copy link

rolve commented Sep 29, 2015

I find the issue codes that are generated for the type system rules very useful for testing. However, I find myself using explicit failures more and more often, because they allow me to provide detailed error information. Unfortunately, explicit failures contain no issue codes!

It would be nice if these failures contained the issue code that corresponds to the containing rule. Even better, if the programmer could provide a more specific issue code manually.

@LorenzoBettini
Copy link
Contributor

Yes, that's an interesting feature; I'll work on that as soon as possible.

It is clear what you mean by specifying issuecode on explicit failure, but could you please provide further information concerning the part "the programmer could provide a more specific issue code manually"?

thanks in advance

@rolve
Copy link
Author

rolve commented Sep 29, 2015

Thank you for your answer. I hope I can make this clearer. My idea is that, by default, explicit failures contain the containing rule's issue code, but the programmer can provide a different one explicitly, like so:

fail
    error "type mismatch: bla bla bla"
    code TYPE_MISMATCH // this could be any string
    source s

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