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
use std::io;
use thiserror::Error;
use crate::{self as miette, Diagnostic};
#[derive(Debug, Diagnostic, Error)]
pub enum MietteError {
#[error(transparent)]
#[diagnostic(code(miette::io_error), url(docsrs))]
IoError(#[from] io::Error),
#[error("The given offset is outside the bounds of its Source")]
#[diagnostic(
code(miette::span_out_of_bounds),
help("Double-check your spans. Do you have an off-by-one error?"),
url(docsrs)
)]
OutOfBounds,
}