filer.js icon indicating copy to clipboard operation
filer.js copied to clipboard

"getEntry_" should use the "opt_errorHandler" passed by "Filer.prototype.open"

Open bux opened this issue 12 years ago • 1 comments

You can't handle the error when the file you are trying to open does not exist.

bux avatar Jul 05 '13 12:07 bux

I just ran into this issue and sent a pull request (including updated method documentation and a test)

I noticed that there's also an existing pull request to fix this bug so that should also be closed. Note: that implementation is undocumented and untested but the same test could be used if that pull request's implementation is preferred.

For getEntry_ I followed the existing convention of ending the method signature with opt_errorHandler. I also followed the pattern of checking for opt_errorHandler else throw(e).

beccasaurus avatar Jul 31 '13 07:07 beccasaurus