Improve Syntax Error Messages and Fix Comments #29
|
@ -15,12 +15,16 @@ fn kym_handle_errors(info: kym.ErrorInfo) void {
|
|||
|
||||
var remaining_frames = info.frames.len;
|
||||
|
||||
if (remaining_frames != 0) {
|
||||
app.log_fail("stack trace:");
|
||||
|
||||
while (remaining_frames != 0) {
|
||||
remaining_frames -= 1;
|
||||
|
||||
app.log_fail(info.frames[remaining_frames].name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn kym_log_info(env: *kym.RuntimeEnv) kym.RuntimeError!?*kym.RuntimeRef {
|
||||
app.log_info(try kym.unbox_string(env, try env.view_arg(0)));
|
||||
|
|
Loading…
Reference in New Issue