| Index: Source/modules/encoding/TextEncoder.cpp
|
| diff --git a/Source/modules/encoding/TextEncoder.cpp b/Source/modules/encoding/TextEncoder.cpp
|
| index 98b935497dc8cdfac456095abfc0044f015937e6..1a26de62da91172943bc0777b555554af6340709 100644
|
| --- a/Source/modules/encoding/TextEncoder.cpp
|
| +++ b/Source/modules/encoding/TextEncoder.cpp
|
| @@ -45,13 +45,13 @@ PassRefPtr<TextEncoder> TextEncoder::create(const String& utfLabel, ExceptionSta
|
|
|
| WTF::TextEncoding encoding(encodingLabel);
|
| if (!encoding.isValid()) {
|
| - exceptionState.throwUninformativeAndGenericTypeError();
|
| + exceptionState.throwTypeError("The encoding label provided ('" + encodingLabel + "') is invalid.");
|
| return 0;
|
| }
|
|
|
| String name(encoding.name());
|
| if (name != "UTF-8" && name != "UTF-16LE" && name != "UTF-16BE") {
|
| - exceptionState.throwUninformativeAndGenericTypeError();
|
| + exceptionState.throwTypeError("The encoding provided ('" + encodingLabel + "') is not one of 'utf-8', 'utf-16', or 'utf-16be'.");
|
| return 0;
|
| }
|
|
|
|
|