Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

View lookup should return something at least #1065

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

gsf commented Apr 2, 2012

Even if the path doesn't exist it's better for the lookup
method to return the last path checked. Without a return
value, if one attempts to render a path that doesn't
exist one gets "TypeError: Bad argument" because the
first param for fs.readFile is undefined. If the path is
returned one gets the more helpful "Error: ENOENT, no
such file or directory" along with the string for the
path.

@gsf gsf View lookup should return something at least
Even if the path doesn't exist it's better for the lookup
method to return the last path checked. Without a return
value, if one attempts to render a path that doesn't
exist one gets "TypeError: Bad argument" because the
first param for fs.readFile is undefined. If the path is
returned one gets the more helpful "Error: ENOENT, no
such file or directory" along with the string for the
path.
fd5127e

@tj tj closed this in 04d43d6 Apr 2, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment