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 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. errAccountCredUpdate = errors.New("Could not update password hash to new method")
  14. errAccountDoesNotExist = errors.New("Account does not exist")
  15. errAccountInvalidCredentials = errors.New("Invalid account credentials")
  16. errAccountBadPassphrase = errors.New("Passphrase contains forbidden characters or is otherwise invalid")
  17. errAccountNickReservationFailed = errors.New("Could not (un)reserve nick")
  18. errAccountNotLoggedIn = errors.New("You're not logged into an account")
  19. errAccountTooManyNicks = errors.New("Account has too many reserved nicks")
  20. errAccountUnverified = errors.New("Account is not yet verified")
  21. errAccountVerificationFailed = errors.New("Account verification failed")
  22. errAccountVerificationInvalidCode = errors.New("Invalid account verification code")
  23. errAccountUpdateFailed = errors.New("Error while updating your account information")
  24. errCallbackFailed = errors.New("Account verification could not be sent")
  25. errCertfpAlreadyExists = errors.New("An account already exists with your certificate")
  26. errChannelAlreadyRegistered = errors.New("Channel is already registered")
  27. errChannelNameInUse = errors.New("Channel name in use")
  28. errInvalidChannelName = errors.New("Invalid channel name")
  29. errMonitorLimitExceeded = errors.New("Monitor limit exceeded")
  30. errNickMissing = errors.New("nick missing")
  31. errNicknameInUse = errors.New("nickname in use")
  32. errNicknameReserved = errors.New("nickname is reserved")
  33. errNoExistingBan = errors.New("Ban does not exist")
  34. errNoSuchChannel = errors.New("No such channel")
  35. errRenamePrivsNeeded = errors.New("Only chanops can rename channels")
  36. errInsufficientPrivs = errors.New("Insufficient privileges")
  37. errSaslFail = errors.New("SASL failed")
  38. errResumeTokenAlreadySet = errors.New("Client was already assigned a resume token")
  39. errInvalidUsername = errors.New("Invalid username")
  40. errFeatureDisabled = errors.New("That feature is disabled")
  41. )
  42. // Socket Errors
  43. var (
  44. errNoPeerCerts = errors.New("Client did not provide a certificate")
  45. errNotTLS = errors.New("Not a TLS connection")
  46. errReadQ = errors.New("ReadQ Exceeded")
  47. )
  48. // String Errors
  49. var (
  50. errCouldNotStabilize = errors.New("Could not stabilize string while casefolding")
  51. errStringIsEmpty = errors.New("String is empty")
  52. errInvalidCharacter = errors.New("Invalid character")
  53. )
  54. // Config Errors
  55. var (
  56. ErrDatastorePathMissing = errors.New("Datastore path missing")
  57. ErrInvalidCertKeyPair = errors.New("tls cert+key: invalid pair")
  58. ErrLimitsAreInsane = errors.New("Limits aren't setup properly, check them and make them sane")
  59. ErrLineLengthsTooSmall = errors.New("Line lengths must be 512 or greater (check the linelen section under server->limits)")
  60. ErrLoggerExcludeEmpty = errors.New("Encountered logging type '-' with no type to exclude")
  61. ErrLoggerFilenameMissing = errors.New("Logging configuration specifies 'file' method but 'filename' is empty")
  62. ErrLoggerHasNoTypes = errors.New("Logger has no types to log")
  63. ErrNetworkNameMissing = errors.New("Network name missing")
  64. ErrNoFingerprintOrPassword = errors.New("Fingerprint or password needs to be specified")
  65. ErrNoListenersDefined = errors.New("Server listening addresses missing")
  66. ErrOperClassDependencies = errors.New("OperClasses contains a looping dependency, or a class extends from a class that doesn't exist")
  67. ErrServerNameMissing = errors.New("Server name missing")
  68. ErrServerNameNotHostname = errors.New("Server name must match the format of a hostname")
  69. )