Minor fix to error handling
This commit is contained in:
parent
02026c42e0
commit
3e4d3fad7d
3 changed files with 8 additions and 3 deletions
|
@ -38,7 +38,10 @@ pub fn start_compiler() {
|
|||
for line in lines.map_while(Result::ok) {
|
||||
match compile(&line) {
|
||||
Ok(_) => println!("\nCompilation OK :)\n"),
|
||||
Err(e) => println!("\n{}\n", e),
|
||||
Err(e) => println!(
|
||||
"{}",
|
||||
format!("{{\"error\": {}}}", json::stringify(format!("{e}")))
|
||||
),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue