1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use std::fmt::Debug;
use thiserror::Error;

#[derive(Error, Debug)]
#[error(
    "\rabra encountered a problem.
Do you think this is a bug? File an issue at https://github.com/denisidoro/abra"
)]
pub struct FileAnIssue {
    #[source]
    source: anyhow::Error,
}

impl FileAnIssue {
    pub fn new<SourceError>(source: SourceError) -> Self
    where
        SourceError: Into<anyhow::Error>,
    {
        FileAnIssue {
            source: source.into(),
        }
    }
}