fix(error display): print errors to stderr

This commit is contained in:
Khaïs COLIN 2025-05-30 13:44:35 +02:00
parent b79702684a
commit 8553ae7a5a
Signed by: logistic-bot
SSH key fingerprint: SHA256:3zI3/tx0ZpCLHCLPmEaGR4oeYCPMCzQxXhXutBmtOAU
2 changed files with 5 additions and 3 deletions

View file

@ -222,7 +222,9 @@ i will use rustyline, since it seems like the most feature-complete
* DONE better error message display for unclosed " in string * DONE better error message display for unclosed " in string
* TODO print errors to stderr * DONE print errors to stderr
* TODO write a proper grammar
* TODO parse insert statements in the form * TODO parse insert statements in the form
insert <id:int> <username:string> <email:string> insert <id:int> <username:string> <email:string>

View file

@ -22,7 +22,7 @@ impl OSDBError for CommandParseError {
) )
.with_note(format!("expected token type to be one of {items:?}")) .with_note(format!("expected token type to be one of {items:?}"))
.finish() .finish()
.print((file, Source::from(input))) .eprint((file, Source::from(input)))
.unwrap() .unwrap()
} }
} }
@ -60,6 +60,6 @@ impl OSDBError for ScanError {
.with_message(format!("{self}")), .with_message(format!("{self}")),
), ),
}; };
report.finish().print((file, Source::from(input))).unwrap(); report.finish().eprint((file, Source::from(input))).unwrap();
} }
} }