Initial commit

This commit is contained in:
2014-10-10 16:38:06 +08:00
commit d3e8b0efa7
7 changed files with 472 additions and 0 deletions

19
errors/FatalError.js Normal file
View File

@@ -0,0 +1,19 @@
function error( msg )
{
this.name = "Fatal Error";
this.message = msg;
var e = new Error();
e = e.stack.split( "\n" );
e[0] = this.name;
e[1] = "";
this.stack = e.join( "\n" );
}
error.prototype.toString = function()
{
return this.name + " " + this.message;
}
module.exports = error;

View File

@@ -0,0 +1,12 @@
function error( msg )
{
this.name = "Internel Server Error";
this.message = msg;
}
error.prototype.toString = function()
{
return this.name + " " + this.message;
}
module.exports = error;