| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 // https://code.google.com/p/chromium/issues/detail?id=252233 | 67 // https://code.google.com/p/chromium/issues/detail?id=252233 |
| 68 { "NotFoundError", "An operation failed because the requested database objec
t could not be found.", 8 }, | 68 { "NotFoundError", "An operation failed because the requested database objec
t could not be found.", 8 }, |
| 69 | 69 |
| 70 // More IDB-specific errors. | 70 // More IDB-specific errors. |
| 71 { "UnknownError", "An unknown error occurred within Indexed Database.", 0 }, | 71 { "UnknownError", "An unknown error occurred within Indexed Database.", 0 }, |
| 72 { "ConstraintError", "A mutation operation in the transaction failed because
a constraint was not satisfied.", 0 }, | 72 { "ConstraintError", "A mutation operation in the transaction failed because
a constraint was not satisfied.", 0 }, |
| 73 { "DataError", "The data provided does not meet requirements.", 0 }, | 73 { "DataError", "The data provided does not meet requirements.", 0 }, |
| 74 { "TransactionInactiveError", "A request was placed against a transaction wh
ich is either currently not active, or which is finished.", 0 }, | 74 { "TransactionInactiveError", "A request was placed against a transaction wh
ich is either currently not active, or which is finished.", 0 }, |
| 75 { "ReadOnlyError", "A write operation was attempted in a read-only transacti
on.", 0 }, | 75 { "ReadOnlyError", "A write operation was attempted in a read-only transacti
on.", 0 }, |
| 76 { "VersionError", "An attempt was made to open a database using a lower vers
ion than the existing version.", 0 }, | 76 { "VersionError", "An attempt was made to open a database using a lower vers
ion than the existing version.", 0 }, |
| 77 |
| 78 // File system |
| 79 { "NotFoundError", "A requested file or directory could not be found at the
time an operation was processed.", 8 }, |
| 80 { "SecurityError", "It was determined that certain files are unsafe for acce
ss within a Web application, or that too many calls are being made on file resou
rces.", 18 }, |
| 81 { "AbortError", "An ongoing operation was aborted, typically with a call to
abort().", 20 }, |
| 82 { "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 }, |
| 83 { "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 }, |
| 84 { "NoModificationAllowedError", "An attempt was made to write to a file or d
irectory which could not be modified due to the state of the underlying filesyst
em.", 7 }, |
| 85 { "InvalidStateError", "An operation that depends on state cached in an inte
rface object was made but the state had changed since it was read from disk.", 1
1 }, |
| 86 { "SyntaxError", "An invalid or unsupported argument was given, like an inva
lid line ending specifier.", 12 }, |
| 87 { "InvalidModificationError", "The modification request was illegal.", 13 }, |
| 88 { "QuotaExceededError", "The operation failed because it would cause the app
lication to exceed its storage quota.", 22 }, |
| 89 { "TypeMismatchError", "The path supplied exists, but was not an entry of re
quested type.", 17 }, |
| 90 { "PathExistsError", "An attempt was made to create a file or directory wher
e an element already exists.", 0 }, |
| 77 }; | 91 }; |
| 78 | 92 |
| 79 static const CoreException* getErrorEntry(ExceptionCode ec) | 93 static const CoreException* getErrorEntry(ExceptionCode ec) |
| 80 { | 94 { |
| 81 size_t tableSize = WTF_ARRAY_LENGTH(coreExceptions); | 95 size_t tableSize = WTF_ARRAY_LENGTH(coreExceptions); |
| 82 size_t tableIndex = ec - INDEX_SIZE_ERR; | 96 size_t tableIndex = ec - INDEX_SIZE_ERR; |
| 83 | 97 |
| 84 return tableIndex < tableSize ? &coreExceptions[tableIndex] : 0; | 98 return tableIndex < tableSize ? &coreExceptions[tableIndex] : 0; |
| 85 } | 99 } |
| 86 | 100 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 134 |
| 121 int DOMCoreException::getLegacyErrorCode(ExceptionCode ec) | 135 int DOMCoreException::getLegacyErrorCode(ExceptionCode ec) |
| 122 { | 136 { |
| 123 const CoreException* entry = getErrorEntry(ec); | 137 const CoreException* entry = getErrorEntry(ec); |
| 124 ASSERT(entry); | 138 ASSERT(entry); |
| 125 | 139 |
| 126 return (entry && entry->code) ? entry->code : 0; | 140 return (entry && entry->code) ? entry->code : 0; |
| 127 } | 141 } |
| 128 | 142 |
| 129 } // namespace WebCore | 143 } // namespace WebCore |
| OLD | NEW |