Class ApiError

Represents a BrowserFS error. Passed back to applications after a failed call to the BrowserFS API.

Hierarchy

  • Error
    • ApiError

Implements

  • ErrnoException

Constructors

  • Represents a BrowserFS error. Passed back to applications after a failed call to the BrowserFS API.

    Error codes mirror those returned by regular Unix file operations, which is what Node returns.

    Parameters

    • type: ErrorCode

      The type of the error.

    • Optional message: string = ...

      A descriptive error message.

    • Optional path: string

    Returns ApiError

Properties

cause?: unknown
code: string
errno: ErrorCode
message: string
name: string
path?: string
stack?: string
syscall: string = ''
prepareStackTrace?: ((err, stackTraces) => any)

Type declaration

stackTraceLimit: number

Methods

  • The size of the API error in buffer-form in bytes.

    Returns number

  • Writes the API error into a buffer.

    Parameters

    • data: ArrayBufferLike | ArrayBufferView = ...
    • i: number = 0

    Returns Uint8Array

  • Creates an ApiError object from a buffer.

    Parameters

    • data: ArrayBufferLike | ArrayBufferView
    • i: number = 0

    Returns ApiError

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc