Misleading error message if snippet returns null
@Shadowfiend is already working on this.
Since May 20, 2016.
- Dominant language
- Scala
- Stars
- 1.3k
- Forks
- 275
- PR merge metrics
- No merged PRs in 30d
Description
Summary
When a snippet returns null, the error message shown in the browser states that the corresponding method could not be found. This is somewhat misleading. I think it would be more informative if it were changed to something like snippet.method returned null. I have uploaded a small project showing this error at https://github.com/aweinert/liftweb-null-snippet.
What I did
$ git clone https://github.com/aweinert/liftweb-null-snippet
<...snip...>
$ cd liftweb-null-snippet
$ ./sbt
> container:start
<...snip...>
Then, open a browser and navigate to 127.0.0.1:8080
What happened
An error is displayed, as shown here: 
What I expected to happen
An error should indeed be displayed, but I think the error message is somewhat misleading.
While it is probably technically correct, it should point to a null-pointer-issue rather than to a method resolution one.
Previous discussion
I have also posted this issue to the mailing list.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.