Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TppInvokeError

Node FaaS Tpp 调用失败

example

创建异常

const error = new TppInvokeError('Tpp调用失败', {
  data: {
    params: tppParams, // tpp 入参
    tppUrl, // tpp 地址
    response, // 返回结果
  },
  cause, // 原始异常
});
param

异常描述,字符串

param

异常附加信息

returns

TppInvokeError instance

Hierarchy

Index

Constructors

constructor

1.0.5 provide
  • new TppInvokeError(message?: string, options?: TppErrorOptions): TppInvokeError

Properties

cause

1.0.5 provide
cause: undefined | Error = ...

message

1.0.5 provide
message: string

name

1.0.5 provide
name: string

Optional stack

1.0.5 provide
stack: string

Static description

1.0.5 provide
description: string = 'TPP调用失败'

Static Optional prepareStackTrace

1.0.5 provide
prepareStackTrace: (err: Error, stackTraces: CallSite[]) => any

Optional override for formatting stack traces

see

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Type declaration

    • (err: Error, stackTraces: CallSite[]): any
    • Parameters

      • err: Error
      • stackTraces: CallSite[]

      Returns any

Static stackTraceLimit

1.0.5 provide
stackTraceLimit: number

Methods

Static captureStackTrace

1.0.5 provide
  • captureStackTrace(targetObject: object, constructorOpt?: Function): void
  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void