| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 { "ReadOnlyError", "A write operation was attempted in a read-only transacti
on.", 0 }, | 69 { "ReadOnlyError", "A write operation was attempted in a read-only transacti
on.", 0 }, |
| 70 { "VersionError", "An attempt was made to open a database using a lower vers
ion than the existing version.", 0 }, | 70 { "VersionError", "An attempt was made to open a database using a lower vers
ion than the existing version.", 0 }, |
| 71 | 71 |
| 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 |
| 80 // Web Crypto |
| 81 { "OperationError", "The operation failed for an operation-specific reason",
0 }, |
| 79 }; | 82 }; |
| 80 | 83 |
| 81 static const CoreException* getErrorEntry(ExceptionCode ec) | 84 static const CoreException* getErrorEntry(ExceptionCode ec) |
| 82 { | 85 { |
| 83 size_t tableSize = WTF_ARRAY_LENGTH(coreExceptions); | 86 size_t tableSize = WTF_ARRAY_LENGTH(coreExceptions); |
| 84 size_t tableIndex = ec - IndexSizeError; | 87 size_t tableIndex = ec - IndexSizeError; |
| 85 | 88 |
| 86 return tableIndex < tableSize ? &coreExceptions[tableIndex] : 0; | 89 return tableIndex < tableSize ? &coreExceptions[tableIndex] : 0; |
| 87 } | 90 } |
| 88 | 91 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 { | 133 { |
| 131 const CoreException* entry = getErrorEntry(ec); | 134 const CoreException* entry = getErrorEntry(ec); |
| 132 ASSERT(entry); | 135 ASSERT(entry); |
| 133 if (!entry) | 136 if (!entry) |
| 134 return "Unknown error."; | 137 return "Unknown error."; |
| 135 | 138 |
| 136 return entry->message; | 139 return entry->message; |
| 137 } | 140 } |
| 138 | 141 |
| 139 } // namespace WebCore | 142 } // namespace WebCore |
| OLD | NEW |