You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

errors.go 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // Copyright (c) 2012-2014 Jeremy Latt
  2. // Copyright (c) 2014-2015 Edmund Huber
  3. // Copyright (c) 2016-2017 Daniel Oaks <daniel@danieloaks.net>
  4. // released under the MIT license
  5. package irc
  6. import "errors"
  7. // Runtime Errors
  8. var (
  9. errAccountAlreadyRegistered = errors.New("Account already exists")
  10. errAccountAlreadyVerified = errors.New("Account is already verified")
  11. errAccountCantDropPrimaryNick = errors.New("Can't unreserve primary nickname")
  12. errAccountCreation = errors.New("Account could not be created")
  13. errAccountDoesNotExist = errors.New("Account does not exist")
  14. errAccountInvalidCredentials = errors.New("Invalid account credentials")
  15. errAccountNickReservationFailed = errors.New("Could not (un)reserve nick")
  16. errAccountNotLoggedIn = errors.New("You're not logged into an account")
  17. errAccountTooManyNicks = errors.New("Account has too many reserved nicks")
  18. errAccountUnverified = errors.New("Account is not yet verified")
  19. errAccountVerificationFailed = errors.New("Account verification failed")
  20. errAccountVerificationInvalidCode = errors.New("Invalid account verification code")
  21. errCallbackFailed = errors.New("Account verification could not be sent")
  22. errCertfpAlreadyExists = errors.New("An account already exists with your certificate")
  23. errChannelAlreadyRegistered = errors.New("Channel is already registered")
  24. errChannelNameInUse = errors.New("Channel name in use")
  25. errInvalidChannelName = errors.New("Invalid channel name")
  26. errMonitorLimitExceeded = errors.New("Monitor limit exceeded")
  27. errNickMissing = errors.New("nick missing")
  28. errNicknameInUse = errors.New("nickname in use")
  29. errNicknameReserved = errors.New("nickname is reserved")
  30. errNoExistingBan = errors.New("Ban does not exist")
  31. errNoSuchChannel = errors.New("No such channel")
  32. errRenamePrivsNeeded = errors.New("Only chanops can rename channels")
  33. errSaslFail = errors.New("SASL failed")
  34. errTooManyKeys = errors.New("Too many metadata keys")
  35. )
  36. // Socket Errors
  37. var (
  38. errNoPeerCerts = errors.New("Client did not provide a certificate")
  39. errNotTLS = errors.New("Not a TLS connection")
  40. errReadQ = errors.New("ReadQ Exceeded")
  41. )
  42. // String Errors
  43. var (
  44. errCouldNotStabilize = errors.New("Could not stabilize string while casefolding")
  45. errStringIsEmpty = errors.New("String is empty")
  46. errInvalidCharacter = errors.New("Invalid character")
  47. )
  48. // Config Errors
  49. var (
  50. ErrDatastorePathMissing = errors.New("Datastore path missing")
  51. ErrInvalidCertKeyPair = errors.New("tls cert+key: invalid pair")
  52. ErrLimitsAreInsane = errors.New("Limits aren't setup properly, check them and make them sane")
  53. ErrLineLengthsTooSmall = errors.New("Line lengths must be 512 or greater (check the linelen section under server->limits)")
  54. ErrLoggerExcludeEmpty = errors.New("Encountered logging type '-' with no type to exclude")
  55. ErrLoggerFilenameMissing = errors.New("Logging configuration specifies 'file' method but 'filename' is empty")
  56. ErrLoggerHasNoTypes = errors.New("Logger has no types to log")
  57. ErrNetworkNameMissing = errors.New("Network name missing")
  58. ErrNoFingerprintOrPassword = errors.New("Fingerprint or password needs to be specified")
  59. ErrNoListenersDefined = errors.New("Server listening addresses missing")
  60. ErrOperClassDependencies = errors.New("OperClasses contains a looping dependency, or a class extends from a class that doesn't exist")
  61. ErrServerNameMissing = errors.New("Server name missing")
  62. ErrServerNameNotHostname = errors.New("Server name must match the format of a hostname")
  63. )