Browse Source

Fix issue when errors are thrown before logger exists

Nathaniel van Diepen 11 years ago
parent
commit
2b43f30205
1 changed files with 5 additions and 1 deletions
  1. 5 1
      app/OmnomIRC.js

+ 5 - 1
app/OmnomIRC.js

@@ -264,5 +264,9 @@ if(cluster.isMaster){
 	});
 }
 process.on('uncaughtException',function(e){
-	logger.error(e);
+	if(typeof logger != 'undefined'){
+		logger.error(e);
+	}else{
+		console.error(e);
+	}
 });