|
1 |
| -#![allow(missing_docs)] |
| 1 | +//! Error types, traits and aliases. |
2 | 2 |
|
3 |
| -// TODO: Figure out how to document error-chain items in the macro |
4 | 3 | error_chain! {
|
5 | 4 | errors {
|
6 |
| - // Thrown whenever a crate cannot be found |
| 5 | + /// Thrown whenever a crate cannot be found |
7 | 6 | CrateErr(crate_name: String) {
|
8 | 7 | description("Crate not found")
|
9 | 8 | display("Crate not found: \"{}\"", crate_name)
|
10 | 9 | }
|
11 | 10 |
|
12 |
| - // Thrown whenever Cargo fails to run properly when getting data for `rustdoc` |
| 11 | + /// Thrown whenever Cargo fails to run properly when getting data for `rustdoc` |
13 | 12 | Cargo(status: ::std::process::ExitStatus, stderr: String) {
|
14 | 13 | description("Cargo command failed to run")
|
15 | 14 | display("Cargo failed with status {}. stderr:\n{}", status, stderr)
|
16 | 15 | }
|
17 | 16 |
|
18 |
| - // Thrown whenever the `JSON` grabbed from somewhere else is not what is expected. |
19 |
| - // This is usually thrown when grabbing data output from `Cargo` |
| 17 | + /// Thrown whenever the `JSON` grabbed from somewhere else is not what is expected. |
| 18 | + /// This is usually thrown when grabbing data output from `Cargo` |
20 | 19 | Json(location: &'static str) {
|
21 | 20 | description("Unexpected JSON response")
|
22 | 21 | display("Unexpected JSON response from {}", location)
|
23 | 22 | }
|
24 | 23 | }
|
25 | 24 |
|
26 | 25 | foreign_links {
|
27 |
| - // `std::io::Error` converted to an error-chain variant |
28 |
| - Io(::std::io::Error); |
29 |
| - // `serde_json::Error` converted to an error-chain variant |
30 |
| - Serde(::serde_json::Error); |
31 |
| - // `analysis::AError` converted to an error-chain variant |
32 |
| - Analysis(::analysis::AError); |
| 26 | + Io(::std::io::Error) |
| 27 | + #[doc = "`std::io::Error` converted to an error-chain variant"]; |
| 28 | + Serde(::serde_json::Error) |
| 29 | + #[doc = "`serde_json::Error` converted to an error-chain variant"]; |
| 30 | + Analysis(::analysis::AError) |
| 31 | + #[doc = "`analysis::AError` converted to an error-chain variant"]; |
33 | 32 | }
|
34 | 33 | }
|
0 commit comments