-
-
Notifications
You must be signed in to change notification settings - Fork 641
Dexie.SchemaError
David Fahlander edited this page Mar 14, 2016
·
3 revisions
-
Error
-
Dexie.DexieError
- Dexie.SchemaError
-
Dexie.DexieError
Happens when the database schema has errors.
doSomeDatabaseWork().then(function(){
// Success
}).catch(Dexie.SchemaError, function (e) {
// Failed with SchemaError
console.error ("Schema error: " + e.message);
}).catch(Error, funtion (e) {
// Any other error derived from standard Error
console.error ("Error: " + e.message);
}).catch(funtion (e) {
// Other error such as a string was thrown
console.error (e);
});
db.on('error', function (error) {
switch (error.name) {
case Dexie.errnames.Schema:
console.error ("Schemad error");
break;
default:
console.error ("error: " + e.message);
}
});
name | Will always be Dexie.errnames.Schema === "SchemaError" |
message | Detailed message |
inner? | Inner exception instance (if any) |
stack | Can be present if the error was thown. If signaled, there wont be any call stack. |
Dexie.js - minimalistic and bullet proof indexedDB library