Skip to content
Snippets Groups Projects
Commit 9da7a543 authored by deuce's avatar deuce
Browse files

Log file.error and errno in file related error messages.

parent 27df7bcd
Branches
Tags
No related merge requests found
...@@ -154,16 +154,16 @@ for (i in filenames) { ...@@ -154,16 +154,16 @@ for (i in filenames) {
} }
if(!font.open("rb",true,4096)) { if(!font.open("rb",true,4096)) {
log(LOG_ERR,"!ERROR Unable to open "+filenames[i]+"!"); log(LOG_ERR,"!ERROR "+font.error+" Unable to open "+filenames[i]+"! errno="+errno);
continue; continue;
} }
// Doesn't work on Win32.. Win32 sucks. // Doesn't work on Win32.. Win32 sucks.
var fontdata=font.read(font.length); var fontdata=font.read(font.length);
font.close();
if(fontdata.length != font.length) { if(fontdata.length != font.length) {
log(LOG_ERR,"!ERROR Error reading font data (read "+fontdata.length+", expected "+font.length+")"); log(LOG_ERR,"!ERROR Error "+font.error+" reading font data (read "+fontdata.length+", expected "+font.length+") errno="+errno);
font.close();
continue; continue;
} }
...@@ -182,7 +182,6 @@ for (i in filenames) { ...@@ -182,7 +182,6 @@ for (i in filenames) {
// fontdata=fontdata.substr(1); // fontdata=fontdata.substr(1);
} }
} }
font.close();
if(showprogress) if(showprogress)
client.socket.send("."); client.socket.send(".");
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment