Skip to content

Commit

Permalink
Work on inital module structure
Browse files Browse the repository at this point in the history
  • Loading branch information
3rd-Eden committed Apr 7, 2011
1 parent 20d6054 commit 0243162
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 7 deletions.
1 change: 0 additions & 1 deletion History.md
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,3 @@

0.0.1 / 2010-01-03 0.0.1 / 2010-01-03
================== ==================


Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,3 @@

test: test:
@echo "populate me" @echo "populate me"


Expand Down
1 change: 0 additions & 1 deletion Readme.md
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,3 @@

# cluster.exception # cluster.exception


Exception handling for cluster.js Exception handling for cluster.js
Expand Down
1 change: 0 additions & 1 deletion index.js
Original file line number Original file line Diff line number Diff line change
@@ -1,2 +1 @@

module.exports = require('./lib/cluster.exception'); module.exports = require('./lib/cluster.exception');
62 changes: 59 additions & 3 deletions lib/cluster.exception.js
Original file line number Original file line Diff line number Diff line change
@@ -1,12 +1,68 @@

/*! /*!
* cluster.exception * cluster.exception
* Copyright(c) 2011 Arnout Kazemier <info@3rd-Eden.com> * Copyright(c) 2011 Arnout Kazemier <info@3rd-Eden.com>
* MIT Licensed * MIT Licensed
*/ */


exports = module.exports = function(options){
options = options || {};

function exception(error, cluster){
var details = {
environment: {
root: process.cwd()
, arguments: process.argv
, env: process.env
, gid: process.getgid()
, uid: process.getuid()
, pid: process.pid
, versions: {
node: process.versions.node
, v8: process.versions.v8
, ares: process.versions.ares
, libev: process.versions.ev
}
}
, os: {
platform: process.platform
, type: os.type()
, release: os.release()
, hostname: os.hostname()
}
, stats: {
loadaverage: os.loadavg()
, cpus: os.cpus()
, freemem: os.freemem()
, totalmem: os.totalmem()
, memory: process.memoryUsage()
}
, error: {
message: error.message
, stack: error.stack
}
, cluster: {

}
};
}

/**
*
* @param {Cluster} cluster A worker or client instance
*/
function plugin(cluster){
// Add a listener to the process
process.on("uncaughtException", function(){

});
};

// Make sure that we also have it called
plugin.enableInWorker = true;
return plugin;
};

/** /**
* Library version. * Library version.
*/ */

exports.version = "0.0.0";
exports.version = '0.0.1';

0 comments on commit 0243162

Please sign in to comment.