16 lines
241 B
Go
16 lines
241 B
Go
package exception
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
type BaseError struct {
|
|
Code int
|
|
Msg string
|
|
ShortMsg string
|
|
}
|
|
|
|
func (err BaseError) Error() string {
|
|
return fmt.Sprintf("%d - 错误: %s - 原因:%s", err.Code, err.ShortMsg, err.Msg)
|
|
}
|