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

Unified Diff: Source/core/css/MediaList.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/FontFaceSet.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/MediaList.cpp
diff --git a/Source/core/css/MediaList.cpp b/Source/core/css/MediaList.cpp
index 823b4364680cff59e82cc77790464f0c6c34b586..1bc518164f897f3e22ad0bb6a62fd465bc990920 100644
--- a/Source/core/css/MediaList.cpp
+++ b/Source/core/css/MediaList.cpp
@@ -201,7 +201,7 @@ void MediaList::deleteMedium(const String& medium, ExceptionState& exceptionStat
bool success = m_mediaQueries->remove(medium);
if (!success) {
- exceptionState.throwUninformativeAndGenericDOMException(NotFoundError);
+ exceptionState.throwDOMException(NotFoundError, "Failed to delete '" + medium + "'.");
return;
}
if (m_parentStyleSheet)
@@ -214,7 +214,7 @@ void MediaList::appendMedium(const String& medium, ExceptionState& exceptionStat
bool success = m_mediaQueries->add(medium);
if (!success) {
- exceptionState.throwUninformativeAndGenericDOMException(InvalidCharacterError);
+ exceptionState.throwDOMException(InvalidCharacterError, "The value provided ('" + medium + "') is not a valid medium.");
return;
}
« no previous file with comments | « Source/core/css/FontFaceSet.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698