diff --git a/notes.org b/notes.org index 3759fa5..12d8410 100644 --- a/notes.org +++ b/notes.org @@ -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 -* TODO print errors to stderr +* DONE print errors to stderr + +* TODO write a proper grammar * TODO parse insert statements in the form insert diff --git a/src/error_display.rs b/src/error_display.rs index 0f8bd14..45b237c 100644 --- a/src/error_display.rs +++ b/src/error_display.rs @@ -22,7 +22,7 @@ impl OSDBError for CommandParseError { ) .with_note(format!("expected token type to be one of {items:?}")) .finish() - .print((file, Source::from(input))) + .eprint((file, Source::from(input))) .unwrap() } } @@ -60,6 +60,6 @@ impl OSDBError for ScanError { .with_message(format!("{self}")), ), }; - report.finish().print((file, Source::from(input))).unwrap(); + report.finish().eprint((file, Source::from(input))).unwrap(); } }