-
-
Notifications
You must be signed in to change notification settings - Fork 641
Dexie.ModifyError
David Fahlander edited this page Mar 11, 2016
·
10 revisions
-
Error
-
DexieError
- Dexie.ModifyError
-
DexieError
Error that may occur in WriteableCollection.modify() and WriteableCollection.delete()
The methods that may throw this error can perform mulpiple operations on a collection. Therefore this error object will contain an array of the errors the occurred during the failed operations.
failures | Array of Error objects of all errors that have occurred |
failedKeys | Array of the keys of the failed modifications. This array will have the same order as failures so that failures[i] will always represent the failure of failedKeys[i] |
successCount | Number of successful modifications made. NOTE: Only useful in case error is catched and transaction is not aborted. |
db.friends.where('name').startsWith('a').delete ()
.catch(ModifyError, function (err) {
err.failures.forEach(function (failure) {
console.error (failure.stack || failure.message);
});
});
Dexie.js - minimalistic and bullet proof indexedDB library