Issue by peterflynn
Monday Nov 05, 2012 at 22:49 GMT
Originally opened as adobe/brackets#2057
The error callbacks passed to various NativeFileSystem APIs are sometimes passed an integer error code, vs. sometimes passed a FileError object containing such an error code. Sometimes even different codepaths through the same method are inconsistent here.
The spec is unambiguous on which one is correct: "the err argument to the ErrorCallback MUST be a DOMError object..."
- FileEntry.createWriter(), Entry.getMetadata(), and requestNativeFileSystem() all pass a number insteead of a FileError
- DirectoryEntry.getFile() and getDirectory() pass a number _or_a FileError, depending on case
- DirectoryReader.readEntries() is similarly inconsistent
- showOpenDialog(), albeit nonstandard, passes a number
Monday Nov 05, 2012 at 22:49 GMT
Originally opened as adobe/brackets#2057
The error callbacks passed to various NativeFileSystem APIs are sometimes passed an integer error code, vs. sometimes passed a FileError object containing such an error code. Sometimes even different codepaths through the same method are inconsistent here.
The spec is unambiguous on which one is correct: "the err argument to the ErrorCallback MUST be a DOMError object..."