Removed unused ISE, added framework header

This commit is contained in:
斟酌 鵬兄 2014-10-10 18:39:53 +08:00
parent d3e8b0efa7
commit c280ecc9b3
4 changed files with 4 additions and 15 deletions

View File

@ -6,7 +6,7 @@ function error( msg )
var e = new Error();
e = e.stack.split( "\n" );
e[0] = this.name;
e[1] = "";
e[1] = msg;
this.stack = e.join( "\n" );
}

View File

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

View File

@ -11,7 +11,7 @@ var Framework = function( garden )
var Router = require( "./Router" );
this.router = new Router( garden );
this.router.addRoute( "404", false, "p404" );
this.router.addRoute( "404", false, "404" );
this.handlers = {
"404": function()

View File

@ -9,7 +9,8 @@ var HTTP = function( req, res )
this.response = {
statusCode: 200
, headers: {
'Content-Type': 'text/html'
"Content-Type": "text/html"
, "Powered-By": "Botanical Framework (Node.js)"
}
, write: function( str ) { _self.response.content = str }
, writeLine: function( str ) { _self.response.content += str + "\n"; }