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

Unified Diff: Source/modules/encoding/TextDecoder.cpp

Issue 120063002: Improve modules' TypeError exception messages. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
Index: Source/modules/encoding/TextDecoder.cpp
diff --git a/Source/modules/encoding/TextDecoder.cpp b/Source/modules/encoding/TextDecoder.cpp
index e463c08f725499571fea8f9e70d3d0fb5051781c..06bf788e0f7aacde318748d8c796432d20bd9c67 100644
--- a/Source/modules/encoding/TextDecoder.cpp
+++ b/Source/modules/encoding/TextDecoder.cpp
@@ -44,7 +44,7 @@ PassRefPtr<TextDecoder> TextDecoder::create(const String& label, const Dictionar
WTF::TextEncoding encoding(encodingLabel);
if (!encoding.isValid()) {
- exceptionState.throwUninformativeAndGenericTypeError();
+ exceptionState.throwTypeError("The encoding label provided ('" + encodingLabel + "') is invalid.");
return 0;
}

Powered by Google App Engine
This is Rietveld 408576698