1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
error_chain!{ errors { SessionHash { description("Cannot generate session hash") display("Unable to generate a session hash") } NoSession { description("Cannot read session info") display("Unable to read session information from database") } NoThread(uri: String) { description("Cannot read thread info") display("Unable to read thread information for {} from database", uri) } DBRead { description("Cannot parse db response") display("Unable to parse response from database query") } DBInsert { description("Cannot insert data in db") display("Database query to insert data failed") } Unauthorized { description("Cannot identify user") display("Unable to complete request without correct authorization") } Rand { description("Cannot generate random number") display("Unable to call /dev/urandom") } ConfigLoad { description("Config file not found") display("Unable to read configuration file oration.yaml") } ConfigParse { description("Error parsing config") display("an error occurred trying to parse the configuratation file") } Deserialize { description("Cannot deserialize data") display("Unable to deserialize data to required struct") } Serialize { description("Cannot serialize data") display("Unable to serialize data to required object") } NoHTTPHandle { description("No HTTP handle") display("The configuration parameter 'host' requires either a http:// or https:// prefix") } EmptySMTP { description("Invalid SMTP configuration") display("Email notifications have been enabled, but one or more of the SMTP server configuration options are empty") } EmptyRecipientEmail { description("Invalid Recipient configuration") display("Email notifications have been enabled, but no email address has been given to send notifications to") } TelegramNotify { description("Telegram Notification failed") display("Response from Telegram API was not OK") } Request { description("HTTP request failed") display("Could not generate HTTP request") } PathCheckFailed { description("Requested path does not exist") display("Could not find path on blog server") } BuildEmail { description("Failed to build email") display("Could not construct notification email") } SendEmail { description("Failed to send email") display("Could not send notification email") } BuildSmtpTransport { description("Failed SMTP handshake") display("Could not attach to SMTP server") } AlreadyVoted { description("Cannot Re-Vote") display("User has already voted on this comment") } } }