Fix errors
This commit is contained in:
parent
43f5cb9d27
commit
099c19d5b2
4
dns.go
4
dns.go
|
@ -102,9 +102,9 @@ func (e *Error) Error() string {
|
|||
return "dns: <nil>"
|
||||
}
|
||||
if e.Name == "" {
|
||||
return e.Err
|
||||
return "dns:" + e.Err
|
||||
}
|
||||
return e.Name + ": " + e.Err
|
||||
return "dns: " + e.Name + ": " + e.Err
|
||||
|
||||
}
|
||||
|
||||
|
|
62
msg.go
62
msg.go
|
@ -26,37 +26,37 @@ import (
|
|||
const maxCompressionOffset = 2 << 13 // We have 14 bits for the compression pointer
|
||||
|
||||
var (
|
||||
ErrUnpack error = &Error{Err: "dns: unpacking failed"}
|
||||
ErrPack error = &Error{Err: "dns: packing failed"}
|
||||
ErrId error = &Error{Err: "dns: id mismatch"}
|
||||
ErrBuf error = &Error{Err: "dns: buffer size too large"}
|
||||
ErrShortRead error = &Error{Err: "dns: short read"}
|
||||
ErrConn error = &Error{Err: "dns: conn holds both UDP and TCP connection"}
|
||||
ErrConnEmpty error = &Error{Err: "dns: conn has no connection"}
|
||||
ErrServ error = &Error{Err: "dns: no servers could be reached"}
|
||||
ErrKey error = &Error{Err: "dns: bad key"}
|
||||
ErrPrivKey error = &Error{Err: "dns: bad private key"}
|
||||
ErrKeySize error = &Error{Err: "dns: bad key size"}
|
||||
ErrKeyAlg error = &Error{Err: "dns: bad key algorithm"}
|
||||
ErrAlg error = &Error{Err: "dns: bad algorithm"}
|
||||
ErrTime error = &Error{Err: "dns: bad time"}
|
||||
ErrNoSig error = &Error{Err: "dns: no signature found"}
|
||||
ErrSig error = &Error{Err: "dns: bad signature"}
|
||||
ErrSecret error = &Error{Err: "dns: no secrets defined"}
|
||||
ErrSigGen error = &Error{Err: "dns: bad signature generation"}
|
||||
ErrAuth error = &Error{Err: "dns: bad authentication"}
|
||||
ErrSoa error = &Error{Err: "dns: no SOA"}
|
||||
ErrHandle error = &Error{Err: "dns: handle is nil"}
|
||||
ErrChan error = &Error{Err: "dns: channel is nil"}
|
||||
ErrName error = &Error{Err: "dns: type not found for name"}
|
||||
ErrRRset error = &Error{Err: "dns: invalid rrset"}
|
||||
ErrDenialNsec3 error = &Error{Err: "dns: no NSEC3 records"}
|
||||
ErrDenialCe error = &Error{Err: "dns: no matching closest encloser found"}
|
||||
ErrDenialNc error = &Error{Err: "dns: no covering NSEC3 found for next closer"}
|
||||
ErrDenialSo error = &Error{Err: "dns: no covering NSEC3 found for source of synthesis"}
|
||||
ErrDenialBit error = &Error{Err: "dns: type not denied in NSEC3 bitmap"}
|
||||
ErrDenialWc error = &Error{Err: "dns: wildcard exist, but closest encloser is denied"}
|
||||
ErrDenialHdr error = &Error{Err: "dns: message rcode conflicts with message content"}
|
||||
ErrUnpack error = &Error{Err: "unpacking failed"}
|
||||
ErrPack error = &Error{Err: "packing failed"}
|
||||
ErrId error = &Error{Err: "id mismatch"}
|
||||
ErrBuf error = &Error{Err: "buffer size too large"}
|
||||
ErrShortRead error = &Error{Err: "short read"}
|
||||
ErrConn error = &Error{Err: "conn holds both UDP and TCP connection"}
|
||||
ErrConnEmpty error = &Error{Err: "conn has no connection"}
|
||||
ErrServ error = &Error{Err: "no servers could be reached"}
|
||||
ErrKey error = &Error{Err: "bad key"}
|
||||
ErrPrivKey error = &Error{Err: "bad private key"}
|
||||
ErrKeySize error = &Error{Err: "bad key size"}
|
||||
ErrKeyAlg error = &Error{Err: "bad key algorithm"}
|
||||
ErrAlg error = &Error{Err: "bad algorithm"}
|
||||
ErrTime error = &Error{Err: "bad time"}
|
||||
ErrNoSig error = &Error{Err: "no signature found"}
|
||||
ErrSig error = &Error{Err: "bad signature"}
|
||||
ErrSecret error = &Error{Err: "no secrets defined"}
|
||||
ErrSigGen error = &Error{Err: "bad signature generation"}
|
||||
ErrAuth error = &Error{Err: "bad authentication"}
|
||||
ErrSoa error = &Error{Err: "no SOA"}
|
||||
ErrHandle error = &Error{Err: "handle is nil"}
|
||||
ErrChan error = &Error{Err: "channel is nil"}
|
||||
ErrName error = &Error{Err: "type not found for name"}
|
||||
ErrRRset error = &Error{Err: "invalid rrset"}
|
||||
ErrDenialNsec3 error = &Error{Err: "no NSEC3 records"}
|
||||
ErrDenialCe error = &Error{Err: "no matching closest encloser found"}
|
||||
ErrDenialNc error = &Error{Err: "no covering NSEC3 found for next closer"}
|
||||
ErrDenialSo error = &Error{Err: "no covering NSEC3 found for source of synthesis"}
|
||||
ErrDenialBit error = &Error{Err: "type not denied in NSEC3 bitmap"}
|
||||
ErrDenialWc error = &Error{Err: "wildcard exist, but closest encloser is denied"}
|
||||
ErrDenialHdr error = &Error{Err: "message rcode conflicts with message content"}
|
||||
)
|
||||
|
||||
// A manually-unpacked version of (id, bits).
|
||||
|
|
Loading…
Reference in New Issue