19 lines
465 B
Plaintext
19 lines
465 B
Plaintext
/*
|
||||
|
|
* Copyright (c) 2025 SimcuTeam. All rights reserved.
|
|||
|
|
* 移植自 C# 项目 SimApi(E:\simcu\simapi-net),遵循 MIT 许可证。
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
package simapi.exceptions
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* API 错误捕获异常:携带业务错误码,由异常中间件统一转换为 HTTP 200 + JSON。
|
|||
|
|
*/
|
|||
|
|
public class SimApiException <: Exception {
|
|||
|
|
public let code: Int64
|
|||
|
|
|
|||
|
|
public init(code: Int64, message!: String = "") {
|
|||
|
|
super(message)
|
|||
|
|
this.code = code
|
|||
|
|
}
|
|||
|
|
}
|