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

Unified Diff: Source/core/css/FontFaceSet.cpp

Issue 128043003: Improve core/css exception messages. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Test. Created 6 years, 11 months 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/css/FontFace.cpp ('k') | Source/core/css/MediaList.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/FontFaceSet.cpp
diff --git a/Source/core/css/FontFaceSet.cpp b/Source/core/css/FontFaceSet.cpp
index 52a93f4d028d763a46eba8900422e6e66e377664..b0c11b4dace76e76b3830a8b6bdb5c4905808b86 100644
--- a/Source/core/css/FontFaceSet.cpp
+++ b/Source/core/css/FontFaceSet.cpp
@@ -295,7 +295,7 @@ Vector<RefPtr<FontFace> > FontFaceSet::match(const String& fontString, const Str
Font font;
if (!resolveFontStyle(fontString, font)) {
- exceptionState.throwUninformativeAndGenericDOMException(SyntaxError);
+ exceptionState.throwDOMException(SyntaxError, "Could not resolve '" + fontString + "' as a font.");
return matchedFonts;
}
@@ -311,7 +311,7 @@ ScriptPromise FontFaceSet::load(const String& fontString, const String& text, Ex
{
Font font;
if (!resolveFontStyle(fontString, font)) {
- exceptionState.throwUninformativeAndGenericDOMException(SyntaxError);
+ exceptionState.throwDOMException(SyntaxError, "Could not resolve '" + fontString + "' as a font.");
return ScriptPromise();
}
@@ -333,7 +333,7 @@ bool FontFaceSet::check(const String& fontString, const String& text, ExceptionS
{
Font font;
if (!resolveFontStyle(fontString, font)) {
- exceptionState.throwUninformativeAndGenericDOMException(SyntaxError);
+ exceptionState.throwDOMException(SyntaxError, "Could not resolve '" + fontString + "' as a font.");
return false;
}
« no previous file with comments | « Source/core/css/FontFace.cpp ('k') | Source/core/css/MediaList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698