Skip to content
Myr

Added NotFoundError spec

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by visionmedia · committed by visionmedia · parent 33e49b3 · Browse files · 2 files+26 added−12 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+26 added−12 removed

  • tests:+11 added−0 removed
  • other:+15 added−12 removed

2 files+26 added−12 removed

modified:lib/express/core.js+15 added-12 removed
1 unmodified line
2// Express - Core - Copyright TJ Holowaychuk <tj@vision-media.ca> (MIT Licensed)34process.mixin(require('sys'))56// --- ExpressError78ExpressError = Class({9 name: 'ExpressError',10 init: function(message) {11 this.message = message12 },13 toString: function() {14 return this.name + ': ' + this.message15 }16})1718// --- Route1920Route = Class({21 init: function(method, path, fn, options){
10 unmodified lines
32})3334// --- Router3524var captures = [],25 params = {}2627ExpressError = Class({28 name: 'ExpressError',29 init: function(message) {30 this.message = message31 },32 toString: function() {33 return this.name + ': ' + this.message34 }35}) 36NotFoundError = ExpressError.extend({37 name: 'NotFoundError',38 init: function(request) {39 this.message = 'failed to find ' + request.method + ' ' + jsonEncode(request.uri.path)40 }41})4243var captures = [],44 params = {}4546Router = Class({47 route: function(request){48 this.request = request49 return this.matchingRoute().run()
209 unmodified lines
modified:spec/spec.core.routing.js+11 added