Dexie.SchemaError
Inheritance Hierarchy
Dexie.DexieError
Dexie.SchemaError
Description
Happens when the database schema has errors.
Sample using Promise.catch()
doSomeDatabaseWork().then(function(){
// Success
}).catch(Dexie.SchemaError, function (e) {
// Failed with SchemaError
console.error ("Schema error: " + e.message);
}).catch(Error, function (e) {
// Any other error derived from standard Error
console.error ("Error: " + e.message);
}).catch(function (e) {
// Other error such as a string was thrown
console.error (e);
});
Sample using switch(error.name)
db.on('error', function (error) {
switch (error.name) {
case Dexie.errnames.Schema:
console.error ("Schemad error");
break;
default:
console.error ("error: " + e.message);
}
});
Properties
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 thrown. If signaled, there wont be any call stack.