Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Changed package.json to require at least Socket.IO 0.7.2, not necessa…

…rily 0.7.2 itself. Added uncaught exception handling.
  • Loading branch information...
commit 405ed34d85ea15ffb53c4677e862b911bad743ef 1 parent 68d1360
@steveWang steveWang authored
Showing with 14 additions and 3 deletions.
  1. +5 −1 lib/now.js
  2. +8 −1 lib/nowUtil.js
  3. +1 −1  package.json
View
6 lib/now.js
@@ -61,4 +61,8 @@ Now.prototype.initialize = function (server, options) {
return everyone;
};
-exports.Now = Now;
+process.on('uncaughtException', function (err) {
+ nowUtil.error(err);
+});
+
+exports.Now = Now;
View
9 lib/nowUtil.js
@@ -17,6 +17,13 @@ var util = {
return Math.random().toString().substr(2);
},
+ error: function(err){
+ console.log(err);
+ if(nowUtil.hasProperty(err, 'stack')){
+ console.log(err.stack);
+ }
+ },
+
getAllChildFqns: function (parentObj, parentFqn) {
var fqns = [];
@@ -70,7 +77,7 @@ var util = {
return val;
}
},
-
+
isEmptyObj: function(obj){
for (var i in obj) {
return false;
View
2  package.json
@@ -11,7 +11,7 @@
"node": ">= v0.4.0"
},
"dependencies": {
- "socket.io": "0.7.2",
+ "socket.io": ">= 0.7.2",
"node-proxy": "0.4.0"
},
"devDependencies": {}

0 comments on commit 405ed34

Please sign in to comment.
Something went wrong with that request. Please try again.