-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change Theme trait to return Result<> (#45)
* Change Theme trait to return results * Add ThemeError
- Loading branch information
1 parent
bfa4ef0
commit 77a8c01
Showing
5 changed files
with
105 additions
and
19 deletions.
There are no files selected for viewing
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,15 @@ | ||
use thiserror::Error; | ||
|
||
/// Theme Errors | ||
/// | ||
/// These are provided for writing new types of themes using the Theme trait. | ||
#[derive(Error, Debug)] | ||
pub enum ThemeError { | ||
/// Theme failed validation | ||
#[error("theme validation failed: {0}")] | ||
ThemeValidationError(String), | ||
|
||
/// Theme failed to generate a color | ||
#[error("theme processing failed: {0}")] | ||
ThemeProcessingError(String), | ||
} |
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