Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

found two places in bogart.js where errors were not thrown property w…

…ith Error constructor, corrected these
  • Loading branch information...
commit 1f1308013e32e553023aade4b26c3964c7edb288 1 parent 2545429
@nrstott authored
Showing with 2 additions and 5 deletions.
  1. +2 −5 lib/bogart.js
View
7 lib/bogart.js
@@ -79,10 +79,7 @@ inherits(App, EventEmitter);
App.prototype.use = function(middleware /*, parameters */) {
if (this.started) {
- throw {
- message: 'Application has already been started. The application may only be configured before it is started.',
- code: 'BOGART_APP_ALREADY_STARTED'
- };
+ throw new Error('Application has already been started. Bogart application may only be configured before it is started.');
}
var args = Array.prototype.slice.call(arguments);
@@ -515,7 +512,7 @@ var ResponseBuilder = exports.ResponseBuilder = function(viewEngine) {
*/
responseBuilder.render = function(view, opts) {
if (!viewEngine) {
- throw "No viewEngine specified"
+ throw new Error("No viewEngine specified");
}
viewEngine.render(view, opts).then(function(content) {
Please sign in to comment.
Something went wrong with that request. Please try again.