Improve error message for parsing errors

Currently we're logging things like:
> Record containing invalid integer: 'FN record missing for function top'
It's better to log them as:
> Parsing error: 'FN record missing for function top'
This commit is contained in:
Marco Castelluccio 2024-11-12 17:03:07 +01:00
Родитель a6ed1e5a7a
Коммит ad135e9e68
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -60,7 +60,7 @@ impl fmt::Display for ParserError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match *self {
ParserError::Io(ref err) => write!(f, "IO error: {}", err),
ParserError::Parse(ref s) => write!(f, "Record containing invalid integer: '{}'", s),
ParserError::Parse(ref s) => write!(f, "Parsing error: '{}'", s),
ParserError::InvalidRecord(ref s) => write!(f, "Invalid record: '{}'", s),
ParserError::InvalidData(ref s) => write!(f, "Invalid data: '{}'", s),
}