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

Unified Diff: Source/core/css/CSSMatrix.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 | « LayoutTests/transforms/cssmatrix-3d-interface-expected.txt ('k') | Source/core/css/CSSPrimitiveValue.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSMatrix.cpp
diff --git a/Source/core/css/CSSMatrix.cpp b/Source/core/css/CSSMatrix.cpp
index 851d7e3f4dd9bec387c19ffbf494d147673f5865..f1138ba55cdb13b35f40f4a88601058e5493467d 100644
--- a/Source/core/css/CSSMatrix.cpp
+++ b/Source/core/css/CSSMatrix.cpp
@@ -70,21 +70,21 @@ void CSSMatrix::setMatrixValue(const String& string, ExceptionState& exceptionSt
DEFINE_STATIC_REF(RenderStyle, defaultStyle, RenderStyle::createDefaultStyle());
TransformOperations operations;
if (!TransformBuilder::createTransformOperations(value.get(), CSSToLengthConversionData(defaultStyle, defaultStyle, 0, 0, 1.0f), operations)) {
- exceptionState.throwUninformativeAndGenericDOMException(SyntaxError);
+ exceptionState.throwDOMException(SyntaxError, "Failed to interpret '" + string + "' as a transformation operation.");
return;
}
// Convert transform operations to a TransformationMatrix. This can fail
// if a param has a percentage ('%')
if (operations.dependsOnBoxSize())
- exceptionState.throwUninformativeAndGenericDOMException(SyntaxError);
+ exceptionState.throwDOMException(SyntaxError, "The transformation depends on the box size, which is not supported.");
TransformationMatrix t;
operations.apply(FloatSize(0, 0), t);
// set the matrix
m_matrix = t;
} else { // There is something there but parsing failed.
- exceptionState.throwUninformativeAndGenericDOMException(SyntaxError);
+ exceptionState.throwDOMException(SyntaxError, "Failed to parse '" + string + "'.");
}
}
@@ -100,7 +100,7 @@ PassRefPtr<CSSMatrix> CSSMatrix::multiply(CSSMatrix* secondMatrix) const
PassRefPtr<CSSMatrix> CSSMatrix::inverse(ExceptionState& exceptionState) const
{
if (!m_matrix.isInvertible()) {
- exceptionState.throwUninformativeAndGenericDOMException(NotSupportedError);
+ exceptionState.throwDOMException(NotSupportedError, "The matrix is not invertable.");
return 0;
}
« no previous file with comments | « LayoutTests/transforms/cssmatrix-3d-interface-expected.txt ('k') | Source/core/css/CSSPrimitiveValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698