first version
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* 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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user