Skip to content

Commit fd0ca15

Browse files
feat(cache): add proper cache read error
1 parent 431fdd1 commit fd0ca15

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/errors.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ pub enum OrandaError {
4444
#[diagnostic(help("Please make sure you give a valid path pointing to a css file."))]
4545
InvalidOrandaCSSOverride { path: String },
4646

47+
#[error("Failed to read cached context.")]
48+
CachedContextReadError {
49+
#[source]
50+
details: Box<OrandaError>,
51+
},
52+
4753
#[error("Failed fetching releases from Github.")]
4854
GithubReleasesFetchError {
4955
#[source]

src/site/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl Site {
5252
Message::new(MessageType::Warning, "Using cached context...").print();
5353
cached
5454
}
55-
Err(e) => Err(OrandaError::Other("Failed to read cached context".to_string()))?
55+
Err(e) => Err(OrandaError::CachedContextReadError{ details: Box::new(e) })?
5656
}
5757
} else {
5858
Context::new(repo_url, config.artifacts.cargo_dist())?

0 commit comments

Comments
 (0)