Chromium Code Reviews| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 74 { "PathExistsError", "An attempt was made to create a file or directory wher e an element already exists.", 0 }, | 74 { "PathExistsError", "An attempt was made to create a file or directory wher e an element already exists.", 0 }, |
| 75 | 75 |
| 76 // SQL | 76 // SQL |
| 77 { "DatabaseError", "The operation failed for some reason related to the data base.", 0 }, | 77 { "DatabaseError", "The operation failed for some reason related to the data base.", 0 }, |
| 78 | 78 |
| 79 // Web Crypto | 79 // Web Crypto |
| 80 { "OperationError", "The operation failed for an operation-specific reason", 0 }, | 80 { "OperationError", "The operation failed for an operation-specific reason", 0 }, |
| 81 | 81 |
| 82 // Push API | 82 // Push API |
| 83 { "PermissionDeniedError", "User or security policy denied the request.", 0 }, | 83 { "PermissionDeniedError", "User or security policy denied the request.", 0 }, |
| 84 | |
| 85 { "NotAllowedError", "The request is not allowed by the user agent or the pl atform in the current context.", 0 }, | |
|
philipj_slow
2016/02/02 09:56:33
Oh, somehow I failed to notice or just forgot that
philipj_slow
2016/02/04 10:54:20
Ping.
mlamouri (slow - plz ping)
2016/02/18 17:06:06
Done.
| |
| 86 | |
| 87 // Please add new entries at the end of this list to guarantee any ordering | |
| 88 // expectations. | |
| 84 }; | 89 }; |
| 85 | 90 |
| 86 static const CoreException* getErrorEntry(ExceptionCode ec) | 91 static const CoreException* getErrorEntry(ExceptionCode ec) |
| 87 { | 92 { |
| 88 size_t tableSize = WTF_ARRAY_LENGTH(coreExceptions); | 93 size_t tableSize = WTF_ARRAY_LENGTH(coreExceptions); |
| 89 size_t tableIndex = ec - IndexSizeError; | 94 size_t tableIndex = ec - IndexSizeError; |
| 90 | 95 |
| 91 return tableIndex < tableSize ? &coreExceptions[tableIndex] : 0; | 96 return tableIndex < tableSize ? &coreExceptions[tableIndex] : 0; |
| 92 } | 97 } |
| 93 | 98 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 148 { | 153 { |
| 149 const CoreException* entry = getErrorEntry(ec); | 154 const CoreException* entry = getErrorEntry(ec); |
| 150 ASSERT(entry); | 155 ASSERT(entry); |
| 151 if (!entry) | 156 if (!entry) |
| 152 return "Unknown error."; | 157 return "Unknown error."; |
| 153 | 158 |
| 154 return entry->message; | 159 return entry->message; |
| 155 } | 160 } |
| 156 | 161 |
| 157 } // namespace blink | 162 } // namespace blink |
| OLD | NEW |