diff --git a/lib/configuration.js b/lib/configuration.js index b3bc1463c..e176f8003 100644 --- a/lib/configuration.js +++ b/lib/configuration.js @@ -115,7 +115,7 @@ Configuration.prototype.load = function() { }) .then(function() { if (!semver.satisfies(pkg.version, that.options.gitbook)) { - throw "GitBook version doesn't satisfy version required by the book: "+that.options.gitbook; + throw new Error("GitBook version doesn't satisfy version required by the book: "+that.options.gitbook); } if (that.options.gitbook != "*" && !semver.satisfies(semver.inc(pkg.version, "patch"), that.options.gitbook)) { that.book.log.warn.ln("gitbook version specified in your book.json might be too strict for future patches, \""+(_.first(pkg.version.split("."))+".x.x")+"\" is more adequate");