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; |
} |