Permalink
Browse files

catch async jsdom init errors

  • Loading branch information...
1 parent 5c9b996 commit 0a9e1ba4b05b233a0bf8d9b4a252ae4e51e495a8 @edrury edrury committed Feb 23, 2013
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/crawler.js
View
@@ -275,7 +275,12 @@ exports.Crawler = function(options) {
toQueue.callback(e);
release(toQueue);
} else {
- jsd([jq]);
+ try {
+ jsd([jq]);
+ } catch (e) {
+ toQueue.callback(e);
+ release(toQueue);
+ }
}
});
} else {

0 comments on commit 0a9e1ba

Please sign in to comment.