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.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. )
  41. // Socket Errors
  42. var (
  43. errNoPeerCerts = errors.New("Client did not provide a certificate")
  44. errNotTLS = errors.New("Not a TLS connection")
  45. errReadQ = errors.New("ReadQ Exceeded")
  46. )
  47. // String Errors
  48. var (
  49. errCouldNotStabilize = errors.New("Could not stabilize string while casefolding")
  50. errStringIsEmpty = errors.New("String is empty")
  51. errInvalidCharacter = errors.New("Invalid character")
  52. )
  53. // Config Errors
  54. var (
  55. ErrDatastorePathMissing = errors.New("Datastore path missing")
  56. ErrInvalidCertKeyPair = errors.New("tls cert+key: invalid pair")
  57. ErrLimitsAreInsane = errors.New("Limits aren't setup properly, check them and make them sane")
  58. ErrLineLengthsTooSmall = errors.New("Line lengths must be 512 or greater (check the linelen section under server->limits)")
  59. ErrLoggerExcludeEmpty = errors.New("Encountered logging type '-' with no type to exclude")
  60. ErrLoggerFilenameMissing = errors.New("Logging configuration specifies 'file' method but 'filename' is empty")
  61. ErrLoggerHasNoTypes = errors.New("Logger has no types to log")
  62. ErrNetworkNameMissing = errors.New("Network name missing")
  63. ErrNoFingerprintOrPassword = errors.New("Fingerprint or password needs to be specified")
  64. ErrNoListenersDefined = errors.New("Server listening addresses missing")
  65. ErrOperClassDependencies = errors.New("OperClasses contains a looping dependency, or a class extends from a class that doesn't exist")
  66. ErrServerNameMissing = errors.New("Server name missing")
  67. ErrServerNameNotHostname = errors.New("Server name must match the format of a hostname")
  68. )