Created
July 27, 2012 11:25
-
-
Save scan/3187479 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
events.js:66 | |
throw arguments[1]; // Unhandled 'error' event | |
^ | |
Error: Parse Error | |
at Socket.socketOnData (http.js:1356:20) | |
at TCP.onread (net.js:404:27) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
request = require 'request' | |
urls = [ | |
# Some Urls | |
] | |
for url,i in urls then do (url, i) -> | |
request.head url, (err, res) -> | |
res?.connection.on 'error', (err) -> | |
console.log "##{i}: Fehler \"#{err.message}\" bei \"#{url}\"" | |
if err? | |
console.log "##{i}: Fehler \"#{err.message}\" bei \"#{url}\"" | |
else | |
console.log "##{i}: Fehler #{res.statusCode} bei \"#{url}\"" if res? and res.statusCode isnt 200 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment