cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raztus <...@git.apache.org>
Subject [GitHub] cordova-plugin-file pull request: Add error codes.
Date Sat, 12 Apr 2014 17:29:59 GMT
Github user raztus commented on the pull request:

    https://github.com/apache/cordova-plugin-file/pull/37#issuecomment-40286432
  
    Here's what I've used successfully:
    
    ```
        var errorMsgs = {},
            code = "";
        for (var static in FileError) {
            code = FileError[static];
            errorMsgs[code] = static;
        }
    ```
    
    Now `errorMsgs` is a map with the code as the key, so you can do `var msg = "Error: "
+ errorMsgs[err.code]` in your error handler.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message