Commit 417143ae authored by rswindell's avatar rswindell
Browse files

Report a JS warning, with details, when fdopen() fails.

parent fa361fad
......@@ -183,7 +183,9 @@ js_open(JSContext *cx, uintN argc, jsval *arglist)
/* Remove (C11 standard) 'x'clusive mode char to avoid MSVC assertion: */
for(e=strchr(fdomode, 'x'); e ; e=strchr(e, 'x'))
memmove(e, e+1, strlen(e));
p->fp=fdopen(file,fdomode);
if((p->fp=fdopen(file,fdomode)) == NULL) {
JS_ReportWarning(cx, "fdopen(%s, %s) ERROR %d: %s", p->name, fdomode, errno, strerror(errno));
}
}
free(fdomode);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment