iot_server/internal/pkg/errort/error_test.go

21 lines
483 B
Go
Raw Normal View History

2023-08-28 06:49:44 +00:00
package errort
import (
"errors"
"testing"
)
func TestErr(t *testing.T) {
err := errors.New("this is err")
errWarp := NewCommonEdgeXWrapper(err)
errWarp = NewCommonEdgeXWrapper(errWarp)
errWarp = NewCommonEdgeXWrapper(errWarp)
errWarp = NewCommonEdgeXWrapper(errWarp)
t.Logf("printferror: %v", errWarp)
t.Log("errors.Error():", errWarp.Error())
t.Log("code:", errWarp.Code())
t.Log("message:", errWarp.Message())
t.Log("debugMessages err:", errWarp.DebugMessages())
}