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 crate::reporting::files::Error as DiagRenderError;
use thiserror::Error;
use calypso_error::CalError;
#[derive(Error, Debug)]
#[allow(clippy::module_name_repetitions)]
pub enum DiagnosticError {
#[error("failed to render diagnostic")]
Rendering(#[from] DiagRenderError),
#[error(
"internal diagnostic representation was printed incorrectly, please file a bug report"
)]
Diagnostic,
}
impl From<DiagnosticError> for CalError {
fn from(err: DiagnosticError) -> Self {
CalError::Other(err.into())
}
}