github.com/sagernet/sing@v0.2.6/common/exceptions/cause.go (about) 1 package exceptions 2 3 type causeError struct { 4 message string 5 cause error 6 } 7 8 func (e *causeError) Error() string { 9 if e.cause == nil { 10 return e.message 11 } 12 return e.message + ": " + e.cause.Error() 13 } 14 15 func (e *causeError) Unwrap() error { 16 return e.cause 17 }