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

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

Issue 120063002: Improve modules' TypeError exception messages. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. 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/modules/indexeddb/IDBCursor.cpp ('k') | Source/modules/indexeddb/IDBObjectStore.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/indexeddb/IDBFactory.cpp
diff --git a/Source/modules/indexeddb/IDBFactory.cpp b/Source/modules/indexeddb/IDBFactory.cpp
index 8b2c42efe921c9cebae8a8c93613dea9ef4cb39a..0d73c058a362c4d689a99c545ce530df1b4d342d 100644
--- a/Source/modules/indexeddb/IDBFactory.cpp
+++ b/Source/modules/indexeddb/IDBFactory.cpp
@@ -97,7 +97,7 @@ PassRefPtr<IDBOpenDBRequest> IDBFactory::open(ExecutionContext* context, const S
{
IDB_TRACE("IDBFactory::open");
if (!version) {
- exceptionState.throwUninformativeAndGenericTypeError();
+ exceptionState.throwTypeError("The version provided must not be 0.");
return 0;
}
return openInternal(context, name, version, exceptionState);
@@ -108,7 +108,7 @@ PassRefPtr<IDBOpenDBRequest> IDBFactory::openInternal(ExecutionContext* context,
blink::Platform::current()->histogramEnumeration("WebCore.IndexedDB.FrontEndAPICalls", IDBOpenCall, IDBMethodsMax);
ASSERT(version >= 1 || version == IDBDatabaseMetadata::NoIntVersion);
if (name.isNull()) {
- exceptionState.throwUninformativeAndGenericTypeError();
+ exceptionState.throwTypeError("The name provided must not be empty.");
return 0;
}
if (!isContextValid(context))
@@ -142,7 +142,7 @@ PassRefPtr<IDBOpenDBRequest> IDBFactory::deleteDatabase(ExecutionContext* contex
IDB_TRACE("IDBFactory::deleteDatabase");
blink::Platform::current()->histogramEnumeration("WebCore.IndexedDB.FrontEndAPICalls", IDBDeleteDatabaseCall, IDBMethodsMax);
if (name.isNull()) {
- exceptionState.throwUninformativeAndGenericTypeError();
+ exceptionState.throwTypeError("The name provided must not be empty.");
return 0;
}
if (!isContextValid(context))
« no previous file with comments | « Source/modules/indexeddb/IDBCursor.cpp ('k') | Source/modules/indexeddb/IDBObjectStore.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698