InvokeException class

调用响应错误的自定义异常。

扩展

Error

构造函数

InvokeException(StatusCodes, T)

属性

Error

继承属性

message
name
stack

方法

createInvokeResponse()

一种工厂方法,该方法使用当前 对象的状态代码和正文创建新的 InvokeResponse 对象。

构造函数详细信息

InvokeException(StatusCodes, T)

new InvokeException(status: StatusCodes, response?: T)

参数

status

StatusCodes

错误的 Http 状态代码。

response

T

选。 异常的正文。 默认值为 null。

属性详细信息

Error

static Error: ErrorConstructor

属性值

ErrorConstructor

继承属性详细信息

message

message: string

属性值

string

继承自 Error.message

name

name: string

属性值

string

继承自 Error.name

stack

stack?: string

属性值

string

继承自 Error.stack

方法详细信息

createInvokeResponse()

一种工厂方法,该方法使用当前 对象的状态代码和正文创建新的 InvokeResponse 对象。

function createInvokeResponse(): InvokeResponse

返回

InvokeResponse

一个新的 InvokeResponse 对象。