We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b180eba commit 99af6ebCopy full SHA for 99af6eb
1 file changed
sqlx-postgres/src/error.rs
@@ -156,7 +156,11 @@ impl Debug for PgDatabaseError {
156
157
impl Display for PgDatabaseError {
158
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
159
- f.write_str(self.message())
+ f.write_str(self.message())?;
160
+ if let Some(line) = self.line() {
161
+ write!(f, " at line {line}")?;
162
+ }
163
+ Ok(())
164
}
165
166
0 commit comments