Dexie.AbortError

Inheritance Hierarchy

Description

Happens when the transaction was aborted. When this happens, it can be a result of an earlier uncaught exception that made the transaction abort. It will also happen when calling Transaction.abort(). To find out more about the abort reason, try look in the console log for earlier exceptions to see the reason behind it.

NOTICE! When catching AbortError, always inspect the property inner to gain more information about the reason why the transaction was aborted.

Sample

doSomeDatabaseWork().then(result => {
    // Success
}).catch(e => {
    return handleError(e);
});

function handleError(e) {
    switch (e.name) {
      case "AbortError":
        if (e.inner) {
          return handleError(e.inner);
        }
        console.error ("Abort error " + e.message);
        break;
      case "QuotaExceededError":
        console.error ("QuotaExceededError " + e.message);
        break;
      default:
        console.error (e);
        break;
    }
 }

Properties

nameWill always be Dexie.errnames.Abort === "AbortError"
messageDetailed message
inner?Inner exception instance (if any)
stackCan be present if the error was thrown. If signaled, there wont be any call stack.

Table of Contents