XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.0.0
    • 2.1.0
    • None
    • None
    • File API docs.phonegap.com

    Description

      The result of File API calls are not clearly defined:

      Some document examples expect the error handler to receive a full fledged object with a target of a FileError object.

      ex.

      function fail(evt) {
              console.log(evt.target.error.code);
          }
      

      The mobile spec tests specifically test that the returned object is a FileError object :

      ex.

      expect(error).toBeFileError(FileError.NOT_FOUND_ERR);
      
       toBeFileError: function(code) {
                      var error = this.actual;
                      this.message = function(){
                          return "Expected FileError with code " + fileErrorMap[error.code] + " (" + error.code + ") to be " + fileErrorMap[code] + "(" + code + ")";
                      };
                      return (error.code == code);
                  }
      

      Attachments

        Activity

          People

            purplecabbage Jesse MacFadyen
            purplecabbage Jesse MacFadyen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: