File Errors in Cordova
What hell this code means ?
Published in
1 min readApr 16, 2014
If you played with Cordova (or Phonegap) File API, you already faced some errors (impossible to have a perfect code from the beginning). But these errors aren’t described somewhere. You just get a code.
After searching in the Cordova files, I found that :
{
"file": "plugins/org.apache.cordova.file/www/FileError.js",
"id": "org.apache.cordova.file.FileError",
"clobbers": [
"window.FileError"
]
},
So finally, I got the description :
// File error codes
// Found in DOMException
FileError.NOT_FOUND_ERR = 1;
FileError.SECURITY_ERR = 2;
FileError.ABORT_ERR = 3;// Added by File API specification
FileError.NOT_READABLE_ERR = 4;
FileError.ENCODING_ERR = 5;
FileError.NO_MODIFICATION_ALLOWED_ERR = 6;
FileError.INVALID_STATE_ERR = 7;
FileError.SYNTAX_ERR = 8;
FileError.INVALID_MODIFICATION_ERR = 9;
FileError.QUOTA_EXCEEDED_ERR = 10;
FileError.TYPE_MISMATCH_ERR = 11;
FileError.PATH_EXISTS_ERR = 12;
Hope it will help you ☺.