Hierarchy

  • BaseError
    • SshConnectError

Constructors

Properties

data: Record<string, unknown>
debugUri: string
details: string
message: string
name: string
source: ErrorSource
stack?: string
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Type declaration

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

  • We cannot rely on instanceof because there can be some mismatch between packages versions as dependencies of different packages. So this function is a workaround to check if an error is of a specific type.

    Parameters

    • error: Error
    • ErrorConstructor: (new (...args: any[]) => Error)
        • new (...args: any[]): Error
        • Parameters

          • Rest ...args: any[]

          Returns Error

    Returns boolean