Skip to content

Commit

Permalink
Improve error message for parsing errors
Browse files Browse the repository at this point in the history
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'
  • Loading branch information
marco-c committed Nov 12, 2024
1 parent a6ed1e5 commit ad135e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}
Expand Down

0 comments on commit ad135e9

Please sign in to comment.