Initial commit
This commit is contained in:
19
errors/FatalError.js
Normal file
19
errors/FatalError.js
Normal 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;
|
12
errors/InternalServerError.js
Normal file
12
errors/InternalServerError.js
Normal 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;
|
Reference in New Issue
Block a user