Refine asc/desc error messages

This commit is contained in:
many 2021-10-28 14:47:17 +02:00
parent ed6db19681
commit 9f1e0d2a49
No known key found for this signature in database
GPG Key ID: 2CEF23B75189EACA

View File

@ -28,7 +28,7 @@ impl fmt::Display for AscDescError {
write!(f, "Longitude must be contained between -180 and 180 degrees.",) write!(f, "Longitude must be contained between -180 and 180 degrees.",)
} }
Self::InvalidSyntax { name } => { Self::InvalidSyntax { name } => {
write!(f, "invalid asc/desc syntax for `{}`.", name) write!(f, "Invalid syntax for the asc/desc parameter: expected expression ending by `:asc` or `:desc`, found `{}`.", name)
} }
Self::ReservedKeyword { name } => { Self::ReservedKeyword { name } => {
write!( write!(
@ -192,8 +192,8 @@ impl fmt::Display for SortError {
Self::BadGeoPointUsage { name } => { Self::BadGeoPointUsage { name } => {
write!( write!(
f, f,
"Invalid syntax for the `_geoPoint` parameter: `{}`. \ "Invalid syntax for the geo parameter: expected expression formated like \
Usage: `_geoPoint(latitude, longitude):asc`.", `_geoPoint(latitude, longitude)` and ending by `:asc` or `:desc`, found `{}`.",
name name
) )
} }