Browse files

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

…ith Error constructor, corrected these
  • Loading branch information...
1 parent 2545429 commit 1f1308013e32e553023aade4b26c3964c7edb288 @nrstott committed Feb 10, 2013
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) {

0 comments on commit 1f13080

Please sign in to comment.