update data type
This commit is contained in:
parent
4eb74a4e3a
commit
93bed37b9c
@ -20,7 +20,7 @@ type IException interface {
|
|||||||
// Message 获取错误信息
|
// Message 获取错误信息
|
||||||
Message() string
|
Message() string
|
||||||
// Data 获取异常时的返回数据
|
// Data 获取异常时的返回数据
|
||||||
Data() map[string]any
|
Data() any
|
||||||
// ToError 转换为内置error类型
|
// ToError 转换为内置error类型
|
||||||
ToError() error
|
ToError() error
|
||||||
// IsCode 是否为指定code
|
// IsCode 是否为指定code
|
||||||
|
@ -24,7 +24,7 @@ import (
|
|||||||
type Exception struct {
|
type Exception struct {
|
||||||
code any
|
code any
|
||||||
message string
|
message string
|
||||||
data map[string]any
|
data any
|
||||||
stack string
|
stack string
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ func (e *Exception) Message() string {
|
|||||||
return e.message
|
return e.message
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *Exception) Data() map[string]any {
|
func (e *Exception) Data() any {
|
||||||
return e.data
|
return e.data
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user