Parcourir la source

空错误新增堆栈信息判定

jys il y a 2 ans
Parent
commit
d7275e5f16
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      v2alpha/public.go

+ 3 - 0
v2alpha/public.go

@@ -131,6 +131,9 @@ func outerMsg(err error) string {
 }
 
 func wrapStack(err error) error {
+	if err == nil {
+		return nil
+	}
 	if _, ok := err.(*fundamental); ok {
 		return err
 	}