fix(error display): print errors to stderr
This commit is contained in:
parent
b79702684a
commit
8553ae7a5a
2 changed files with 5 additions and 3 deletions
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue