| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 // File system | 72 // File system |
| 73 { "NotReadableError", "The requested file could not be read, typically due t
o permission problems that have occurred after a reference to a file was acquire
d.", 0 }, | 73 { "NotReadableError", "The requested file could not be read, typically due t
o permission problems that have occurred after a reference to a file was acquire
d.", 0 }, |
| 74 { "EncodingError", "A URI supplied to the API was malformed, or the resultin
g Data URL has exceeded the URL length limitations for Data URLs.", 0 }, | 74 { "EncodingError", "A URI supplied to the API was malformed, or the resultin
g Data URL has exceeded the URL length limitations for Data URLs.", 0 }, |
| 75 { "PathExistsError", "An attempt was made to create a file or directory wher
e an element already exists.", 0 }, | 75 { "PathExistsError", "An attempt was made to create a file or directory wher
e an element already exists.", 0 }, |
| 76 | 76 |
| 77 // SQL | 77 // SQL |
| 78 { "DatabaseError", "The operation failed for some reason related to the data
base.", 0 }, | 78 { "DatabaseError", "The operation failed for some reason related to the data
base.", 0 }, |
| 79 | 79 |
| 80 // Web Crypto | 80 // Web Crypto |
| 81 { "OperationError", "The operation failed for an operation-specific reason",
0 }, | 81 { "OperationError", "The operation failed for an operation-specific reason",
0 }, |
| 82 |
| 83 // Push API |
| 84 { "PermissionDeniedError", "User or security policy denied the request.", 0
}, |
| 82 }; | 85 }; |
| 83 | 86 |
| 84 static const CoreException* getErrorEntry(ExceptionCode ec) | 87 static const CoreException* getErrorEntry(ExceptionCode ec) |
| 85 { | 88 { |
| 86 size_t tableSize = WTF_ARRAY_LENGTH(coreExceptions); | 89 size_t tableSize = WTF_ARRAY_LENGTH(coreExceptions); |
| 87 size_t tableIndex = ec - IndexSizeError; | 90 size_t tableIndex = ec - IndexSizeError; |
| 88 | 91 |
| 89 return tableIndex < tableSize ? &coreExceptions[tableIndex] : 0; | 92 return tableIndex < tableSize ? &coreExceptions[tableIndex] : 0; |
| 90 } | 93 } |
| 91 | 94 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 { | 149 { |
| 147 const CoreException* entry = getErrorEntry(ec); | 150 const CoreException* entry = getErrorEntry(ec); |
| 148 ASSERT(entry); | 151 ASSERT(entry); |
| 149 if (!entry) | 152 if (!entry) |
| 150 return "Unknown error."; | 153 return "Unknown error."; |
| 151 | 154 |
| 152 return entry->message; | 155 return entry->message; |
| 153 } | 156 } |
| 154 | 157 |
| 155 } // namespace blink | 158 } // namespace blink |
| OLD | NEW |