JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
print fs open/read error
authorJason Woofenden <jason@jasonwoof.com>
Wed, 25 Jan 2012 18:41:44 +0000 (13:41 -0500)
committerJason Woofenden <jason@jasonwoof.com>
Wed, 25 Jan 2012 18:41:44 +0000 (13:41 -0500)
server.coffee

index 1ce56f2..db252bd 100644 (file)
@@ -104,7 +104,7 @@ js_handler = (args, out, request, url_parts) ->
 html_handler = (args, out, request, url_parts) ->
        fs.readFile 'index.html', 'utf8', (err, data) ->
                if err
-                       return out.end 'Server failed to read index.html'
+                       return out.end "Server failed to read index.html: #{err}"
                out.end data
 
 clean_pathname_regex = new RegExp('[^a-zA-Z/_.-]')