start working on a cli app #7
1 changed files with 6 additions and 1 deletions
|
@ -39,8 +39,13 @@ mod error_reporting {
|
|||
let offset = try_reconstruct_loc(src, err.line(), err.column());
|
||||
|
||||
Report::build(ariadne::ReportKind::Error, "test", offset)
|
||||
.with_label(Label::new(("test", offset..offset)))
|
||||
.with_label(
|
||||
Label::new(("test", offset..offset)).with_message("Something went wrong here!"),
|
||||
)
|
||||
.with_message(err.to_string())
|
||||
.with_note(
|
||||
"We'd like to give better errors, but serde errors are horrible to work with...",
|
||||
)
|
||||
.finish()
|
||||
.print(("test", Source::from(src)))
|
||||
.unwrap();
|
||||
|
|
Loading…
Reference in a new issue