This is a visualizing tool that locates the source of errors within sequences and outputs formatted results, designed to assist users and developers in quickly identifying input that triggers errors.
moon add KCN-judu/err_marker@0.2.0let report = @err_marker.Report::new(Error, "unknown mode 'sovle'")
.with_code("E01")
.with_mark(
@err_marker.Mark::primary(
@err_marker.Span::new(3, 4),
message="did you mean 'solve'?",
),
)
let args = @err_marker.Sequence::from_args(["sudoku", "export", "a.txt", "sovle", "out.txt"])
println(report.render(args))sudoku export a.txt sovle out.txt
^^^^^ did you mean 'solve'?
error[E01]: unknown mode 'sovle'pub struct ErrorData {
err_type : String?
err_msg : String
err_pos : Int
err_offset : Int
}type Sequence[T]fn utf16_to_scalar(text : String, offset : Int) -> IntInstall
Download zipThis is a visualizing tool that locates the source of errors within sequences and outputs formatted results, designed to assist users and developers in quickly identifying input that triggers errors.