diff --git a/internal/fd.c b/internal/fd.c index 43be0c86..88d51851 100644 --- a/internal/fd.c +++ b/internal/fd.c @@ -117,10 +117,10 @@ JSC_CCALL(fd_read, JSC_SCALL(fd_slurp, struct stat st; if (stat(str, &st) != 0) - return JS_RaiseDisrupt(js, "stat failed: %s", strerror(errno)); + return JS_RaiseDisrupt(js, "stat failed for %s: %s", str, strerror(errno)); if (!S_ISREG(st.st_mode)) - return JS_RaiseDisrupt(js, "path is not a regular file"); + return JS_RaiseDisrupt(js, "path %s is not a regular file", str); size_t size = st.st_size; if (size == 0)