Correctly handle not found errors in partial routes
Take care of obvious case. A router with a route to '/foo/bar' but not for '/foo', should give a not found error.master
parent
9da1eabbf2
commit
79fb5395ab
@ -0,0 +1,14 @@
|
|||||||
|
var util = require('util')
|
||||||
|
|
||||||
|
function NotFound(message, options) {
|
||||||
|
Error.call(this)
|
||||||
|
options = options || {}
|
||||||
|
this.message = message || ''
|
||||||
|
this.location = options.location || ''
|
||||||
|
}
|
||||||
|
|
||||||
|
util.inherits(NotFound, Error)
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
NotFound: NotFound
|
||||||
|
}
|
Loading…
Reference in New Issue