Aller au contenu principal

RuntimeError

Error that occurred during program execution

Hierarchy

  • Readonly<Error & { cause: unknown; message: string; name: RuntimeError; stack: string } & { name: RuntimeError }>
    • RuntimeError

Index

Constructors

Properties

Methods

Constructors

constructor

  • Error constructor

Properties

staticreadonlyerrorName

errorName: RuntimeError

Error name

Methods

staticasString

  • asString(self: Error): string
  • Static method to convert an error to a string

    @example
    CustomError.asString(new Error('my message'));

statichasInstance

  • hasInstance<Class>(this: Class, anyValue: unknown): anyValue is InstanceType<Class>
  • Return true if anyValue is an instance of current class


    Type parameters

    • Class: new (...args: any) => any