You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Jesse MacFadyen (JIRA)" <ji...@apache.org> on 2012/08/02 03:56:02 UTC
[jira] [Created] (CB-1179) File error docs are inconsistent
Jesse MacFadyen created CB-1179:
-----------------------------------
Summary: File error docs are inconsistent
Key: CB-1179
URL: https://issues.apache.org/jira/browse/CB-1179
Project: Apache Cordova
Issue Type: Sub-task
Components: Docs
Affects Versions: 2.0.0
Environment: File API docs.phonegap.com
Reporter: Jesse MacFadyen
Assignee: Jesse MacFadyen
Fix For: 2.1.0
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.
{code:javascript}
function fail(evt) {
console.log(evt.target.error.code);
}
{code}
The mobile spec tests specifically test that the returned object is a FileError object :
ex.
{code:javascript}
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);
}
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CB-1179) File error docs are inconsistent
Posted by "Jesse MacFadyen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-1179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jesse MacFadyen resolved CB-1179.
---------------------------------
Resolution: Duplicate
> File error docs are inconsistent
> --------------------------------
>
> Key: CB-1179
> URL: https://issues.apache.org/jira/browse/CB-1179
> Project: Apache Cordova
> Issue Type: Sub-task
> Components: Docs
> Affects Versions: 2.0.0
> Environment: File API docs.phonegap.com
> Reporter: Jesse MacFadyen
> Assignee: Jesse MacFadyen
> Fix For: 2.1.0
>
>
> 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.
> {code:javascript}
> function fail(evt) {
> console.log(evt.target.error.code);
> }
> {code}
> The mobile spec tests specifically test that the returned object is a FileError object :
> ex.
> {code:javascript}
> 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);
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira