-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update libcosmic and improve error handling
- Loading branch information
1 parent
2fd615c
commit d9a9686
Showing
14 changed files
with
787 additions
and
645 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
use thiserror::Error; | ||
|
||
#[derive(Debug, Error)] | ||
pub enum Error { | ||
#[error("The requested service was unavailable")] | ||
ServiceUnavailable, | ||
#[error("IO error: {0}")] | ||
Io(#[from] std::io::Error), | ||
#[error("Ron spanned error: {0}")] | ||
RonSpanned(#[from] ron::error::SpannedError), | ||
#[error("Ron deserialization error: {0}")] | ||
RonDeserialization(#[from] ron::de::Error), | ||
#[error("Sqlx error: {0}")] | ||
Sqlx(#[from] sqlx::Error), | ||
#[error("Libset error: {0}")] | ||
Libset(#[from] libset::Error), | ||
#[error("TaskS error: {0}")] | ||
Tasks(#[from] TasksError), | ||
} | ||
|
||
#[derive(Debug, Error)] | ||
pub enum TasksError { | ||
#[error("The requested service is unavailable")] | ||
ServiceUnavailable, | ||
#[error("Task not found")] | ||
TaskNotFound, | ||
#[error("Task already exists")] | ||
ExistingTask, | ||
#[error("List not found")] | ||
ListNotFound, | ||
#[error("List already exists")] | ||
ExistingList, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
pub mod error; | ||
pub mod models; | ||
pub mod service; | ||
pub mod services; | ||
pub(crate) mod task_service; | ||
pub use error::*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.