Skip to content

text/template: handle indirection of nil better #7333

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

Closed
robpike opened this issue Feb 14, 2014 · 1 comment
Closed

text/template: handle indirection of nil better #7333

robpike opened this issue Feb 14, 2014 · 1 comment
Milestone

Comments

@robpike
Copy link
Contributor

robpike commented Feb 14, 2014

http://play.golang.org/p/uP6pCW3qKT

The crash in the last of the sequences in this program is necessary (we indirect through
a nil pointer while attempting to find  value with which to call a function), but the
error presentation is not helpful to the user.

It would be nice to catch this somehow, at least to show context about where the error
occurred in the template.

Maybe an easy fix. Marking for 1.3Maybe in case that's true. The bare panic here is very
unfortunate.
@robpike
Copy link
Contributor Author

robpike commented Feb 15, 2014

Comment 1:

This issue was closed by revision 71575a9.

Status changed to Fixed.

@robpike robpike self-assigned this Feb 15, 2014
@rsc rsc added this to the Go1.3 milestone Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
@rsc rsc unassigned robpike Jun 23, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants