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

@@ -103,7 +103,7 @@ impl Version {
*/
pub fn getVersionForDimensions(numRows: u32, numColumns: u32) -> Result<&'static Version> {
if (numRows & 0x01) != 0 || (numColumns & 0x01) != 0 {
return Err(Exceptions::format);
return Err(Exceptions::FORMAT);
}
for version in VERSIONS.iter() {
@@ -112,7 +112,7 @@ impl Version {
}
}
Err(Exceptions::format)
Err(Exceptions::FORMAT)
}
/**