aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/repository/artifact_repository.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/repository/artifact_repository.rs')
-rw-r--r--crates/shirabe/src/repository/artifact_repository.rs14
1 files changed, 9 insertions, 5 deletions
diff --git a/crates/shirabe/src/repository/artifact_repository.rs b/crates/shirabe/src/repository/artifact_repository.rs
index 2d16f137..75ad134b 100644
--- a/crates/shirabe/src/repository/artifact_repository.rs
+++ b/crates/shirabe/src/repository/artifact_repository.rs
@@ -224,11 +224,15 @@ impl ArtifactRepository {
.unwrap_or_default();
match self.loader.load(cfg, None) {
Ok(package) => Ok(Some(package)),
- Err(exception) => Err(UnexpectedValueException::new(format!(
- "Failed loading package in {}: {}",
- pathname, exception
- ))
- .into()),
+ Err(exception) => {
+ let message = format!("Failed loading package in {}: {}", pathname, exception);
+ Err(UnexpectedValueException::with_code_and_previous(
+ message,
+ 0,
+ Some(std::sync::Arc::new(exception)),
+ )
+ .into())
+ }
}
}
}