Skip to content
Myr

perf: isolate app.render try block

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

authored by Douglas Christopher Wilson · committed by Douglas Christopher Wilson · parent 1050248 · Browse files · 2 files+15 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

2 files+15 added−5 removed

  • other:+15 added−5 removed

2 files+15 added−5 removed

modified:lib/application.js+14 added-5 removed
587 unmodified lines
588 }589 }590591 // render592 try {593 view.render(renderOptions, done);594 } catch (err) {595 done(err);596 }592 tryRender(view, renderOptions, done);593};594595/**596 * Listen for connections.
31 unmodified lines
628function logerror(err) {629 /* istanbul ignore next */630 if (this.get('env') !== 'test') console.error(err.stack || err.toString());631}632633/**634 * Try rendering a view.635 * @private636 */637638function tryRender(view, options, callback) {639 try {640 view.render(options, callback);641 } catch (err) {642 callback(err);643 }644}
modified:History.md+1 added
64 unmodified lines
65 - deps: mime-types@~2.1.166 - perf: reduce try block size67 - perf: remove bitwise operations68 * perf: enable strict mode69 * perf: isolate `app.render` try block70 * perf: remove argument reassignments in application71 * perf: remove argument reassignments in `View`72 * perf: use saved reference to `http.STATUS_CODES`73
2883 unmodified lines