database: Add parsing error

This commit is contained in:
Elias Projahn 2021-04-25 22:56:16 +02:00
parent ac14beb665
commit 20683ca824
2 changed files with 7 additions and 7 deletions

View file

@ -264,10 +264,10 @@ impl Database {
for part_index in work_parts {
if !part_index.is_empty() {
let index = str::parse(part_index).or(Err(Error::Other(format!(
"Failed to parse part index from '{}'.",
row.work_parts
))))?;
let index = str::parse(part_index).or(Err(Error::ParsingError(
"part index",
String::from(part_index),
)))?;
part_indices.push(index);
}