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

Better error reporting when snippet methods can't be found #75

Closed
kjetilv opened this issue Oct 1, 2009 · 3 comments
Closed

Better error reporting when snippet methods can't be found #75

kjetilv opened this issue Oct 1, 2009 · 3 comments
Assignees
Labels

Comments

@kjetilv
Copy link

kjetilv commented Oct 1, 2009

Snippets are matched against methods using reflection. If a method cannot be found, it is sometimes because of a signature mismatch, and useful information about this can be conveyed to the user.

The mismatch is typically either the wrong arguments, or wrong return type. (The latter can easily happen if is not declared explicitly, but inferenced by the compiler!)

Error cases can be tricky to report, because of overloading. However, if there is only a single method by the matching name, the user would benefit greatly from an error message saying that the method WAS in fact found, but it could not be used, for this reason. Simply saying that the method wasn't found is slightly misleading, and suggests that a rebuild is needed, or something.

The case of the wrong return type should be easier to report, since methods cannot be overloaded by return type only. Hence, if there is a method with the correct argument list (which should be checked for first) it could be reported as "the method you probably wanted to use".

@dpp
Copy link
Member

dpp commented Oct 9, 2009

Additional error message goodness added 2009/10/09

@github-importer
Copy link

Imported from GitHub: http://github.com/dpp/liftweb/issues/75/find

@github-importer
Copy link

Imported from Assembla: http://www.assembla.com/spaces/liftweb/tickets/75

@ghost ghost assigned dpp Mar 1, 2012
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants