Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Hierarchy

  • Error
    • ApiError

Implements

  • ErrnoException

Index

Constructors

constructor

  • 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.

    constructor

    ApiError

    Parameters

    • type: ErrorCode

      The type of the error.

    • Default value message: string = ErrorStrings[type]
    • Optional path: string

    Returns ApiError

Properties

code

code: string

errno

errno: ErrorCode

path

path: string | undefined

stack

stack: string | undefined

syscall

syscall: string = ""

Static Error

Error: ErrorConstructor

Static message

message: string

Static name

name: string

Static Optional stack

stack: string

Methods

bufferSize

  • bufferSize(): number

toJSON

  • toJSON(): any

toString

  • toString(): string

writeToBuffer

  • writeToBuffer(buffer?: Buffer, i?: number): Buffer
  • Writes the API error into a buffer.

    Parameters

    • Default value buffer: Buffer = Buffer.alloc(this.bufferSize())
    • Default value i: number = 0

    Returns Buffer

Static EEXIST

Static EISDIR

Static ENOENT

Static ENOTDIR

Static ENOTEMPTY

Static EPERM

Static FileError

Static fromBuffer

  • fromBuffer(buffer: Buffer, i?: number): ApiError
  • Creates an ApiError object from a buffer.

    Parameters

    • buffer: Buffer
    • Default value i: number = 0

    Returns ApiError

Static fromJSON

Generated using TypeDoc