Skip to content

[CLOSED] NativeFileSystem APIs pass inconsistent types to error handlers #1990

@core-ai-bot

Description

@core-ai-bot

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions