errors.go 320 B

123456789101112131415161718192021
  1. package idavollr
  2. import (
  3. "fmt"
  4. )
  5. type EmptyBoxError struct{}
  6. func (EmptyBoxError) Error() string {
  7. return ""
  8. }
  9. type MalformedMessageError struct {
  10. MessageID string
  11. Cause error
  12. }
  13. func (e MalformedMessageError) Error() string {
  14. return fmt.Sprintf("Malformed message %s: %s", e.MessageID, e.Cause.Error())
  15. }