| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 82 |
| 83 // Push API | 83 // Push API |
| 84 { "PermissionDeniedError", "User or security policy denied the request.", 0
}, | 84 { "PermissionDeniedError", "User or security policy denied the request.", 0
}, |
| 85 | 85 |
| 86 // Used by HTML and Media Session API. | 86 // Used by HTML and Media Session API. |
| 87 { "NotAllowedError", "The request is not allowed by the user agent or the pl
atform in the current context.", 0 }, | 87 { "NotAllowedError", "The request is not allowed by the user agent or the pl
atform in the current context.", 0 }, |
| 88 |
| 89 // Pointer Event |
| 90 { "InvalidPointerId", "PointerId was invalid.", 0 }, |
| 88 }; | 91 }; |
| 89 | 92 |
| 90 static const CoreException* getErrorEntry(ExceptionCode ec) | 93 static const CoreException* getErrorEntry(ExceptionCode ec) |
| 91 { | 94 { |
| 92 size_t tableSize = WTF_ARRAY_LENGTH(coreExceptions); | 95 size_t tableSize = WTF_ARRAY_LENGTH(coreExceptions); |
| 93 size_t tableIndex = ec - IndexSizeError; | 96 size_t tableIndex = ec - IndexSizeError; |
| 94 | 97 |
| 95 return tableIndex < tableSize ? &coreExceptions[tableIndex] : 0; | 98 return tableIndex < tableSize ? &coreExceptions[tableIndex] : 0; |
| 96 } | 99 } |
| 97 | 100 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 { | 155 { |
| 153 const CoreException* entry = getErrorEntry(ec); | 156 const CoreException* entry = getErrorEntry(ec); |
| 154 ASSERT(entry); | 157 ASSERT(entry); |
| 155 if (!entry) | 158 if (!entry) |
| 156 return "Unknown error."; | 159 return "Unknown error."; |
| 157 | 160 |
| 158 return entry->message; | 161 return entry->message; |
| 159 } | 162 } |
| 160 | 163 |
| 161 } // namespace blink | 164 } // namespace blink |
| OLD | NEW |