Skip to content

Commit

Permalink
report vnc connection errors #1
Browse files Browse the repository at this point in the history
  • Loading branch information
sidorares committed May 24, 2013
1 parent ac22685 commit 40b5b98
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion vnc-over-gif.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,13 @@ http.createServer(function(req, res) {
r.on('error', function(err) {
console.error(err);
res.writeHead(502, { 'Content-Type': 'text/plain'});
res.end(err);
if (typeof(err) == 'string') {
res.end(err);
} else if (err instanceof Error) {
res.end(err.message);
} else {
res.end('unknown error:' + JSON.stringify(err));
}
});

} else {
Expand Down

0 comments on commit 40b5b98

Please sign in to comment.