Skip to content

Commit

Permalink
Merge pull request #101 from acook/call-info-error
Browse files Browse the repository at this point in the history
Add error message to CALL/INFO
  • Loading branch information
Oldes authored Feb 12, 2025
2 parents 96b13b8 + 3e217b9 commit a4b1b30
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/core/n-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,15 @@ static REBSER *Read_All_File(char *fname)
SET_INTEGER(val, exit_code);
}

// based on f-stubs Make_OS_Error()
if (r != 0) {
REBCHR str[100];
OS_FORM_ERROR(r, str, 100);

val = Append_Frame(obj, NULL, SYM_ERROR);
SET_STRING(val, Copy_OS_Str(str, (REBINT)LEN_STR(str)));
}

SET_OBJECT(D_RET, obj);
return R_RET;
}
Expand Down

0 comments on commit a4b1b30

Please sign in to comment.