Lots of fixes ahead of release

This commit is contained in:
Jonathan Turner
2019-08-21 18:39:57 +12:00
parent 55f5893b59
commit e3e4e30fb3
13 changed files with 316 additions and 244 deletions

View File

@ -258,19 +258,19 @@ pub async fn cli() -> Result<(), Box<dyn Error>> {
LineResult::Error(mut line, err) => {
rl.add_history_entry(line.clone());
let diag = err.to_diagnostic();
let host = context.host.lock().unwrap();
let writer = host.err_termcolor();
line.push_str(" ");
let files = crate::parser::Files::new(line);
language_reporting::emit(
&mut writer.lock(),
&files,
&diag,
&language_reporting::DefaultConfig,
)?;
let _ = std::panic::catch_unwind(move || {
let _ = language_reporting::emit(
&mut writer.lock(),
&files,
&diag,
&language_reporting::DefaultConfig,
);
});
}
LineResult::Break => {