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

Side by Side Diff: Source/modules/indexeddb/IDBObjectStore.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/modules/indexeddb/IDBFactory.cpp ('k') | Source/modules/indexeddb/IDBTransaction.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 } 389 }
390 if (!m_transaction->isActive()) { 390 if (!m_transaction->isActive()) {
391 exceptionState.throwDOMException(TransactionInactiveError, IDBDatabase:: transactionInactiveErrorMessage); 391 exceptionState.throwDOMException(TransactionInactiveError, IDBDatabase:: transactionInactiveErrorMessage);
392 return 0; 392 return 0;
393 } 393 }
394 if (!keyPath.isValid()) { 394 if (!keyPath.isValid()) {
395 exceptionState.throwDOMException(SyntaxError, "The keyPath argument cont ains an invalid key path."); 395 exceptionState.throwDOMException(SyntaxError, "The keyPath argument cont ains an invalid key path.");
396 return 0; 396 return 0;
397 } 397 }
398 if (name.isNull()) { 398 if (name.isNull()) {
399 exceptionState.throwUninformativeAndGenericTypeError(); 399 exceptionState.throwTypeError("The name provided is null.");
400 return 0; 400 return 0;
401 } 401 }
402 if (containsIndex(name)) { 402 if (containsIndex(name)) {
403 exceptionState.throwDOMException(ConstraintError, "An index with the spe cified name already exists."); 403 exceptionState.throwDOMException(ConstraintError, "An index with the spe cified name already exists.");
404 return 0; 404 return 0;
405 } 405 }
406 406
407 if (keyPath.type() == IDBKeyPath::ArrayType && multiEntry) { 407 if (keyPath.type() == IDBKeyPath::ArrayType && multiEntry) {
408 exceptionState.throwDOMException(InvalidAccessError, "The keyPath argume nt was an array and the multiEntry option is true."); 408 exceptionState.throwDOMException(InvalidAccessError, "The keyPath argume nt was an array and the multiEntry option is true.");
409 return 0; 409 return 0;
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 } 617 }
618 return IDBIndexMetadata::InvalidId; 618 return IDBIndexMetadata::InvalidId;
619 } 619 }
620 620
621 WebIDBDatabase* IDBObjectStore::backendDB() const 621 WebIDBDatabase* IDBObjectStore::backendDB() const
622 { 622 {
623 return m_transaction->backendDB(); 623 return m_transaction->backendDB();
624 } 624 }
625 625
626 } // namespace WebCore 626 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/indexeddb/IDBFactory.cpp ('k') | Source/modules/indexeddb/IDBTransaction.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698