github.com/ydb-platform/ydb-go-sdk/v3@v3.57.0/internal/conn/error.go (about) 1 package conn 2 3 import "fmt" 4 5 type connError struct { 6 nodeID uint32 7 endpoint string 8 err error 9 } 10 11 func newConnError(id uint32, endpoint string, err error) connError { 12 return connError{ 13 nodeID: id, 14 endpoint: endpoint, 15 err: err, 16 } 17 } 18 19 func (n connError) Error() string { 20 return fmt.Sprintf("connError{node_id:%d,address:'%s'}: %v", n.nodeID, n.endpoint, n.err) 21 } 22 23 func (n connError) Unwrap() error { 24 return n.err 25 }