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

Unified Diff: Source/modules/indexeddb/IDBCursor.cpp

Issue 120063002: Improve modules' TypeError exception messages. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years 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
Index: Source/modules/indexeddb/IDBCursor.cpp
diff --git a/Source/modules/indexeddb/IDBCursor.cpp b/Source/modules/indexeddb/IDBCursor.cpp
index 8ea735858c5ba2e5254bbb7ca3ec2074d93d6faa..e7b30239821438070b2f744aff5ac65b29ba93bc 100644
--- a/Source/modules/indexeddb/IDBCursor.cpp
+++ b/Source/modules/indexeddb/IDBCursor.cpp
@@ -161,7 +161,7 @@ void IDBCursor::advance(unsigned long count, ExceptionState& exceptionState)
}
if (!count) {
- exceptionState.throwUninformativeAndGenericTypeError();
+ exceptionState.throwTypeError("The count provided is 0.");
return;
}
@@ -392,7 +392,7 @@ IndexedDB::CursorDirection IDBCursor::stringToDirection(const String& directionS
if (directionString == IDBCursor::directionPrevUnique())
return IndexedDB::CursorPrevNoDuplicate;
- exceptionState.throwUninformativeAndGenericTypeError();
+ exceptionState.throwTypeError("The direction provided ('" + directionString + "') is not one of 'next', 'nextunique', 'prev', or 'prevunique'.");
return IndexedDB::CursorNext;
}

Powered by Google App Engine
This is Rietveld 408576698