Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ChromeLastError

A custom error that can be persisted

remarks

Usage:

const err = new ChromeLastError(title, message);

Hierarchy

  • Error
    • ChromeLastError

Index

Constructors

Properties

Methods

Constructors

constructor

  • new ChromeLastError(title?: string, ...params: string[]): ChromeLastError
  • Create a new LastError

    Parameters

    • Default value title: string = "An error occurred"
    • Rest ...params: string[]

      Error parameters

    Returns ChromeLastError

Properties

message

message: string

name

name: string

Optional stack

stack: undefined | string

title

title: string

Title for error

Static Error

Error: ErrorConstructor

Methods

Static load

  • Get the LastError from chrome.storage.local

    throws

    If we failed to get the error

    Returns Promise<ChromeLastError>

    A ChromeLastError

Static reset

  • reset(): Promise<void>
  • Set the LastError to an empty message in chrome.storage.local

    throws

    If the error failed to clear

    Returns Promise<void>

Static save

  • Save the LastError to chrome.storage.local

    throws

    If the error failed to save

    Parameters

    Returns Promise<void>

Generated using TypeDoc