feat: pass error messages up

more of a fix but TIL more about thiserror
This commit is contained in:
əlemi 2024-02-13 23:52:27 +01:00
parent 1f2999914b
commit 8f50fcc1eb
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -1,18 +1,18 @@
#[derive(Debug, thiserror::Error)]
enum TciError {
#[error("could not understand file system structure, bailing out")]
#[error("could not understand file system structure, bailing out: {0}")]
FsError(&'static str),
#[error("missing tci script")]
MissingScript,
#[error("unexpected i/o error")]
#[error("unexpected i/o error: {0}")]
IoError(#[from] std::io::Error),
#[error("git error")]
#[error("git error: {0}")]
GitError(#[from] git2::Error),
#[error("subprocess finished with non-zero exit code")]
#[error("subprocess finished with non-zero exit code: {0}")]
SubprocessError(i32),
#[error("subprocess terminated")]