aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-class-map-generator/src/class_map.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe-class-map-generator/src/class_map.rs')
-rw-r--r--crates/shirabe-class-map-generator/src/class_map.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/crates/shirabe-class-map-generator/src/class_map.rs b/crates/shirabe-class-map-generator/src/class_map.rs
index 0b828be4..65eb3790 100644
--- a/crates/shirabe-class-map-generator/src/class_map.rs
+++ b/crates/shirabe-class-map-generator/src/class_map.rs
@@ -92,10 +92,11 @@ impl ClassMap {
pub fn get_class_path(&self, class_name: &str) -> anyhow::Result<&str> {
match self.map.get(class_name) {
Some(path) => Ok(path.as_str()),
- None => Err(anyhow::anyhow!(OutOfBoundsException {
- message: format!("Class {} is not present in the map", class_name),
- code: 0,
- })),
+ None => Err(OutOfBoundsException::new(format!(
+ "Class {} is not present in the map",
+ class_name
+ ))
+ .into()),
}
}