-
-
Notifications
You must be signed in to change notification settings - Fork 647
Dexie.MissingAPIError
David Fahlander edited this page Mar 17, 2016
·
2 revisions
-
Error
-
Dexie.DexieError
- Dexie.MissingAPIError
-
Dexie.DexieError
Happens when indexedDB API could not be found when trying to open database.
doSomeDatabaseWork().then(function() {
// Success
}).catch(Dexie.MissingAPIError, function (e) {
// Failed with MissingAPIError
console.error ("MissingAPI 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.MissingAPI: // errnames.MissingAPI ==="MissingAPIError"
console.error ("MissingAPI error");
break;
default:
console.error ("error: " + e);
}
});
name | Will always be Dexie.errnames.MissingAPI === "MissingAPIError" |
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