start working on a cli app #7

Merged
schrottkatze merged 12 commits from :app into main 2024-01-20 19:09:52 +00:00
Showing only changes of commit 33aa131b95 - Show all commits

View file

@ -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();