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 // Part of WebIDL. Used by HTML and Media Session API. | |
|
philipj_slow
2016/02/19 08:21:48
I wanted to say "the above are also part of WebIDL
mlamouri (slow - plz ping)
2016/02/23 16:49:00
Removed. "Part of WebIDL.". Though, I've added the
| |
| 86 { "NotAllowedError", "The request is not allowed by the user agent or the pl atform in the current context.", 0 }, | |
| 87 | |
| 88 // Please add new entries at the end of this list to guarantee any ordering | |
|
philipj_slow
2016/02/24 09:38:28
There's a comment at the top ExceptionCode.h that
mlamouri (slow - plz ping)
2016/02/25 11:07:35
Done. I will check what the error was exactly. It
philipj_slow
2016/02/25 14:06:48
I also meant to imply that this comment at the bot
mlamouri (slow - plz ping)
2016/02/25 14:40:05
Removed. I'm going to investigate why that was nee
| |
| 89 // expectations. | |
| 84 }; | 90 }; |
| 85 | 91 |
| 86 static const CoreException* getErrorEntry(ExceptionCode ec) | 92 static const CoreException* getErrorEntry(ExceptionCode ec) |
| 87 { | 93 { |
| 88 size_t tableSize = WTF_ARRAY_LENGTH(coreExceptions); | 94 size_t tableSize = WTF_ARRAY_LENGTH(coreExceptions); |
| 89 size_t tableIndex = ec - IndexSizeError; | 95 size_t tableIndex = ec - IndexSizeError; |
| 90 | 96 |
| 91 return tableIndex < tableSize ? &coreExceptions[tableIndex] : 0; | 97 return tableIndex < tableSize ? &coreExceptions[tableIndex] : 0; |
| 92 } | 98 } |
| 93 | 99 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 148 { | 154 { |
| 149 const CoreException* entry = getErrorEntry(ec); | 155 const CoreException* entry = getErrorEntry(ec); |
| 150 ASSERT(entry); | 156 ASSERT(entry); |
| 151 if (!entry) | 157 if (!entry) |
| 152 return "Unknown error."; | 158 return "Unknown error."; |
| 153 | 159 |
| 154 return entry->message; | 160 return entry->message; |
| 155 } | 161 } |
| 156 | 162 |
| 157 } // namespace blink | 163 } // namespace blink |
| OLD | NEW |