Use thiserror for error handling with less boilerplate

This commit is contained in:
Steve Cook
2023-02-20 09:41:28 -05:00
parent 01e4f4a126
commit f8b29f37db
135 changed files with 868 additions and 905 deletions

View File

@@ -96,9 +96,9 @@ impl LuminanceSource for Luma8LuminanceSource {
}
fn rotateCounterClockwise45(&self) -> Result<Box<dyn LuminanceSource>> {
Err(crate::Exceptions::UnsupportedOperationException(Some(
"This luminance source does not support rotation by 45 degrees.".to_owned(),
)))
Err(crate::Exceptions::unsupported_operation_with(
"This luminance source does not support rotation by 45 degrees.",
))
}
}