Skip to content

Commit

Permalink
Use a TIC-80 error prior to an R error when there is a parsing error
Browse files Browse the repository at this point in the history
  • Loading branch information
bryce-carson committed Nov 15, 2024
1 parent 5bab6ca commit 883e137
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/api/r.org
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,10 @@ only one).
code_expr = PROTECT(R_ParseVector(code_sexp, -1, &code_parse_status, R_NilValue));
if (code_parse_status != PARSE_OK) {
UNPROTECT(2);
tic_core *core = (tic_core *)tic;
if (core->data) {
core->data->error(core->data->data, "Function `TIC-80` was not called because parsing code in editor failed.");
}
Rf_error("Invalid call %s", code);
}
for (int i = 0; i < Rf_length(code_expr); i++) {
Expand Down

0 comments on commit 883e137

Please sign in to comment.