|
@@ -12,6 +12,7 @@ type WTError interface {
|
|
|
/* 访问类操作 */
|
|
|
Class() WTErrorClass
|
|
|
Code() string
|
|
|
+ Msg() string
|
|
|
Message() string
|
|
|
MessageWithStack() string
|
|
|
Stack() string
|
|
@@ -43,6 +44,10 @@ func (w *wtError) Code() string {
|
|
|
return w.code
|
|
|
}
|
|
|
|
|
|
+func (w *wtError) Msg() string {
|
|
|
+ return w.msg
|
|
|
+}
|
|
|
+
|
|
|
func (w *wtError) Message() string {
|
|
|
if w.cause == nil {
|
|
|
return fmt.Sprintf("[%s] %s", w.code, w.msg)
|