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

Unified Diff: Source/core/css/FontFace.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/CSSStyleSheet.cpp ('k') | Source/core/css/FontFaceSet.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/FontFace.cpp
diff --git a/Source/core/css/FontFace.cpp b/Source/core/css/FontFace.cpp
index aac3b7e4adda019bfc6f6e90b0456158b606e72f..f54d23258f1ca351183c55b6dd1f1e433786c481 100644
--- a/Source/core/css/FontFace.cpp
+++ b/Source/core/css/FontFace.cpp
@@ -102,7 +102,7 @@ PassRefPtr<FontFace> FontFace::create(const AtomicString& family, const String&
{
RefPtr<CSSValue> src = parseCSSValue(source, CSSPropertySrc);
if (!src || !src->isValueList()) {
- exceptionState.throwUninformativeAndGenericDOMException(SyntaxError);
+ exceptionState.throwDOMException(SyntaxError, "The source provided ('" + source + "') could not be parsed as a value list.");
return 0;
}
@@ -246,7 +246,7 @@ void FontFace::setPropertyFromString(const String& s, CSSPropertyID propertyID,
{
RefPtr<CSSValue> value = parseCSSValue(s, propertyID);
if (!value || !setPropertyValue(value, propertyID))
- exceptionState.throwUninformativeAndGenericDOMException(SyntaxError);
+ exceptionState.throwDOMException(SyntaxError, "Failed to set '" + s + "' as a property value.");
}
bool FontFace::setPropertyFromStyle(const StylePropertySet* properties, CSSPropertyID propertyID)
« no previous file with comments | « Source/core/css/CSSStyleSheet.cpp ('k') | Source/core/css/FontFaceSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698