mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-23 13:24:27 +01:00
in case of error return a range of chars position instead of one line and column
This commit is contained in:
parent
2c6d08c519
commit
9b24f83456
@ -146,12 +146,8 @@ impl<'a> Display for Error<'a> {
|
|||||||
)?,
|
)?,
|
||||||
ErrorKind::External(ref error) => writeln!(f, "{}", error)?,
|
ErrorKind::External(ref error) => writeln!(f, "{}", error)?,
|
||||||
}
|
}
|
||||||
write!(
|
let base_column = self.context.get_utf8_column();
|
||||||
f,
|
let size = self.context.fragment().chars().count();
|
||||||
"{}:{} in `{}`.",
|
write!(f, "{}:{} in `{}`.", base_column, base_column + size, self.context.extra,)
|
||||||
self.context.location_line(),
|
|
||||||
self.context.get_utf8_column(),
|
|
||||||
self.context.extra,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user