Improve serialization error messages
This commit is contained in:
parent
8ad770d046
commit
b382ffbbbe
@ -39,8 +39,10 @@ impl fmt::Display for CalculatorError {
|
|||||||
CalculatorError::ParseError => write!(f, "Parse error"),
|
CalculatorError::ParseError => write!(f, "Parse error"),
|
||||||
CalculatorError::PrecisionTooHigh => write!(f, "Precision too high"),
|
CalculatorError::PrecisionTooHigh => write!(f, "Precision too high"),
|
||||||
CalculatorError::SaveError(None) => write!(f, "Could not save"),
|
CalculatorError::SaveError(None) => write!(f, "Could not save"),
|
||||||
|
CalculatorError::SaveError(Some(ConfyError::SerializeTomlError(e))) => write!(f, "Save serialization error: {}", e),
|
||||||
CalculatorError::SaveError(Some(e)) => write!(f, "Could not save: {}", e),
|
CalculatorError::SaveError(Some(e)) => write!(f, "Could not save: {}", e),
|
||||||
CalculatorError::LoadError(None) => write!(f, "Could not load"),
|
CalculatorError::LoadError(None) => write!(f, "Could not load"),
|
||||||
|
CalculatorError::LoadError(Some(ConfyError::SerializeTomlError(e))) => write!(f, "Load serialization error: {}", e),
|
||||||
CalculatorError::LoadError(Some(e)) => write!(f, "Could not load: {}", e),
|
CalculatorError::LoadError(Some(e)) => write!(f, "Could not load: {}", e),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user