mirror of
https://forge.katzen.cafe/katzen-cafe/iowo.git
synced 2024-11-21 13:14:41 +01:00
app: improve errors a bit more
added a message to the label so the position of the error gets shown and a note to make clear we don't have enough info for better error messages thanks to serde
This commit is contained in:
parent
e7db9c38f3
commit
33aa131b95
|
@ -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