Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AbortError

Package version

This error is thrown when an asynchronous operation has been aborted. Check for this error by testing the name that the name property of the error matches "AbortError".

example

const controller = new AbortController(); controller.abort(); try { doAsyncWork(controller.signal) } catch (e) { if (e.name === 'AbortError') { // handle abort error here. } }

Hierarchy

  • Error
    • AbortError

Index

Constructors

Properties

Constructors

constructor

  • new AbortError(message?: undefined | string): AbortError
  • Parameters

    • Optional message: undefined | string

    Returns AbortError

Properties

message

message: string

name

name: string

Optional stack

stack: undefined | string

Static Error

Error: ErrorConstructor

Generated using TypeDoc