Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(678)

Unified Diff: Source/core/dom/custom/CustomElementException.cpp

Issue 99083002: WIP: Migrate generated bindings to new ExceptionState constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase. Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/TreeWalker.cpp ('k') | Source/core/dom/shadow/ShadowRoot.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/custom/CustomElementException.cpp
diff --git a/Source/core/dom/custom/CustomElementException.cpp b/Source/core/dom/custom/CustomElementException.cpp
index 78a01f163b1c1995c907a6add683acd14e54dcca..331548af8b6d246be09fb7344443a7db9be99e9f 100644
--- a/Source/core/dom/custom/CustomElementException.cpp
+++ b/Source/core/dom/custom/CustomElementException.cpp
@@ -38,22 +38,22 @@ namespace WebCore {
String CustomElementException::preamble(const AtomicString& type)
{
- return "Failed to call 'register' on 'Document' for type '" + type + "': ";
+ return "Registration failed for type '" + type + "'. ";
}
void CustomElementException::throwException(Reason reason, const AtomicString& type, ExceptionState& exceptionState)
{
switch (reason) {
case CannotRegisterFromExtension:
- exceptionState.throwDOMException(NotSupportedError, preamble(type) + "elements cannot be registered from extensions.");
+ exceptionState.throwDOMException(NotSupportedError, preamble(type) + "Elements cannot be registered from extensions.");
return;
case ConstructorPropertyNotConfigurable:
- exceptionState.throwDOMException(NotSupportedError, preamble(type) + "prototype constructor property is not configurable.");
+ exceptionState.throwDOMException(NotSupportedError, preamble(type) + "Prototype constructor property is not configurable.");
return;
case ContextDestroyedCheckingPrototype:
- exceptionState.throwDOMException(InvalidStateError, preamble(type) + "the context is no longer valid.");
+ exceptionState.throwDOMException(InvalidStateError, preamble(type) + "The context is no longer valid.");
return;
case ContextDestroyedCreatingCallbacks:
@@ -65,27 +65,27 @@ void CustomElementException::throwException(Reason reason, const AtomicString& t
return;
case ExtendsIsInvalidName:
- exceptionState.throwDOMException(InvalidCharacterError, preamble(type) + ": the tag name specified in 'extends' is not a valid tag name.");
+ exceptionState.throwDOMException(InvalidCharacterError, preamble(type) + "The tag name specified in 'extends' is not a valid tag name.");
return;
case ExtendsIsCustomElementName:
- exceptionState.throwDOMException(InvalidCharacterError, preamble(type) + ": the tag name specified in 'extends' is a custom element name. Use inheritance instead.");
+ exceptionState.throwDOMException(InvalidCharacterError, preamble(type) + "The tag name specified in 'extends' is a custom element name. Use inheritance instead.");
return;
case InvalidName:
- exceptionState.throwDOMException(InvalidCharacterError, preamble(type) + ": '" + type + "' is not a valid name.");
+ exceptionState.throwDOMException(InvalidCharacterError, preamble(type) + "The type name is invalid.");
return;
case PrototypeInUse:
- exceptionState.throwDOMException(NotSupportedError, preamble(type) + "prototype is already in-use as an interface prototype object.");
+ exceptionState.throwDOMException(NotSupportedError, preamble(type) + "The prototype is already in-use as an interface prototype object.");
return;
case PrototypeNotAnObject:
- exceptionState.throwDOMException(InvalidStateError, preamble(type) + "the prototype option is not an object.");
+ exceptionState.throwDOMException(InvalidStateError, preamble(type) + "The prototype option is not an object.");
return;
case TypeAlreadyRegistered:
- exceptionState.throwDOMException(InvalidStateError, preamble(type) + "a type with that name is already registered.");
+ exceptionState.throwDOMException(InvalidStateError, preamble(type) + "A type with that name is already registered.");
return;
}
« no previous file with comments | « Source/core/dom/TreeWalker.cpp ('k') | Source/core/dom/shadow/ShadowRoot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698