Skip to content
Myr

Break -> Halt [#11]

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

authored by visionmedia · committed by visionmedia · parent 8e523c6 · Browse files · 1 file+5 added−5 removed
This commit

State

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

Diff stats

1 file+5 added−5 removed

  • other:+5 added−5 removed

1 file+5 added−5 removed

modified:lib/express.core.js+5 added-5 removed
4 unmodified lines
5 Express = { 6 version : '0.0.1',7 routes : [],8 9 // --- Break9 // --- Halt10 11 Break : function(){11 Halt : function(){12 this.toString = function() {13 return 'Express.Break'13 return 'Express.Halt'14 }15 },16 17 // --- Response
134 unmodified lines
152 * @api private153 */154155 fail : function(e) {156 if (e.constructor == Express.Break) return156 if (e.constructor == Express.Halt) return157 this.header('Content-Type', 'text/plain')158 this.response.body = e.message ? e.name + ': ' + e.message : e.toString()159 this.response.status = 500160 },
105 unmodified lines
266 267 respond : function(body, status) {268 this.response.body = body269 this.status(status)270 throw new Express.Break()270 throw new Express.Halt()271 },272 273 /**274 * Sets _name_ header to _value_. When _value_
321 unmodified lines