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

kjetilv opened this Issue Oct 1, 2009 · 3 comments

3 participants


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".

Lift Web Framework member
dpp commented Oct 9, 2009

Additional error message goodness added 2009/10/09

@dpp dpp was assigned 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