initial commit
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I79a875e75937ff6b3739ca36bfb0b2836a6a6964
This commit is contained in:
commit
6203ea7f52
13 changed files with 3226 additions and 0 deletions
29
crates/common/src/error.rs
Normal file
29
crates/common/src/error.rs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
//! Error types for FC CI
|
||||
|
||||
use thiserror::Error;
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
pub enum CiError {
|
||||
#[error("Database error: {0}")]
|
||||
Database(#[from] sqlx::Error),
|
||||
|
||||
#[error("Git error: {0}")]
|
||||
Git(#[from] git2::Error),
|
||||
|
||||
#[error("Serialization error: {0}")]
|
||||
Serialization(#[from] serde_json::Error),
|
||||
|
||||
#[error("IO error: {0}")]
|
||||
Io(#[from] std::io::Error),
|
||||
|
||||
#[error("Configuration error: {0}")]
|
||||
Config(String),
|
||||
|
||||
#[error("Build error: {0}")]
|
||||
Build(String),
|
||||
|
||||
#[error("Not found: {0}")]
|
||||
NotFound(String),
|
||||
}
|
||||
|
||||
pub type Result<T> = std::result::Result<T, CiError>;
|
||||
Loading…
Add table
Add a link
Reference in a new issue