Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

Hierarchy

  • ICrashHunter

Index

Methods

asyncAttempt

  • asyncAttempt<TResult>(func: (...args: any[]) => Promise<TResult>, ...args: any[]): Promise<TResult | Error>
  • Type parameters

    • TResult

    Parameters

    • func: (...args: any[]) => Promise<TResult>

      Attempt function

        • (...args: any[]): Promise<TResult>
        • Parameters

          • Rest ...args: any[]

          Returns Promise<TResult>

    • Rest ...args: any[]

      Attempt function args

    Returns Promise<TResult | Error>

attempt

  • attempt<TResult>(func: (...args: any[]) => TResult, ...args: any[]): TResult | Error
  • Type parameters

    • TResult

    Parameters

    • func: (...args: any[]) => TResult

      Attempt function

        • (...args: any[]): TResult
        • Parameters

          • Rest ...args: any[]

          Returns TResult

    • Rest ...args: any[]

      Attempt function args

    Returns TResult | Error

captureException

  • captureException(exception: any, context?: Context): string | undefined
  • Captures an exception event and sends it to Sentry.

    Parameters

    • exception: any

      An exception-like object.

    • Optional context: Context

      May contain additional information about the original exception.

    Returns string | undefined

    The event id

captureMessage

  • captureMessage(message: string, context?: Context, name?: undefined | string, stacktrace?: undefined | string): string | undefined
  • Captures a message event and sends it to Sentry.

    Parameters

    • message: string

      The message to send to Sentry.

    • Optional context: Context

      May contain additional information about the original exception.

    • Optional name: undefined | string

      The error name.

    • Optional stacktrace: undefined | string

      Stacktrace.

    Returns string | undefined

    The event id

close

  • close(timeout?: undefined | number): Promise<boolean>
  • A promise that resolves when all current events have been sent. If you provide a timeout and the queue takes longer to drain the promise returns false.

    Parameters

    • Optional timeout: undefined | number

      Maximum time in ms the client should wait.

    Returns Promise<boolean>

enableDebugLog

  • enableDebugLog(enable: boolean): void

flush

  • flush(timeout?: undefined | number): Promise<boolean>
  • A promise that resolves when all current events have been sent. If you provide a timeout and the queue takes longer to drain the promise returns false.

    Parameters

    • Optional timeout: undefined | number

      Maximum time in ms the client should wait.

    Returns Promise<boolean>

getLogger

getOption

getSDKVersion

  • getSDKVersion(): string

setMetadataValue

  • setMetadataValue(key: keyof Metadata, value: Metadata[typeof key]): void
  • 设置 SDK Metadata value

    Parameters

    • key: keyof Metadata

      SDK Metadata key

    • value: Metadata[typeof key]

      SDK Metadata value

    Returns void

    void

Legend

  • Method
  • Method
  • Private property

Generated using TypeDoc