provola_core/
errors.rs

1use crate::test_runners::TestRunnerFeature;
2
3#[derive(thiserror::Error, Debug)]
4pub enum Error {
5    #[error("no test result available")]
6    NoResult,
7    #[error("executable not available")]
8    NoExecutable,
9    #[error("cannot build: {0}")]
10    BuildFailed(String),
11    #[error("i/o error")]
12    IoError(#[from] std::io::Error),
13    #[error("language not supported: {0}")]
14    LangNotSupported(String),
15    #[error("cannot execute")]
16    ExecError(#[from] subprocess::PopenError),
17    #[error(transparent)]
18    InvalidInputData(std::io::Error),
19    #[error(transparent)]
20    InvalidOutputData(std::io::Error),
21    #[error("nothing to do")]
22    NothingToDo,
23    #[error("not implemented")]
24    NotImplemented,
25    #[error("cannot watch file: {0}")]
26    CannotWatch(String),
27    #[error("test runner not supported: {0}")]
28    TestRunnerNotSupported(String),
29    #[error("reporter error")]
30    ReporterError(#[from] crate::reporter::Error),
31    #[error("report unavailable")]
32    ReportUnavailable,
33    #[error("feature not available: {0}")]
34    TestRunnerFeatureNotAvailable(TestRunnerFeature),
35    #[error("cannot parse report: {0}")]
36    ReportParseError(Box<dyn std::error::Error>),
37    #[error("gui is not available")]
38    GuiNotAvailable,
39    #[error("{0}")]
40    GenericError(String),
41}