From 813210bf470308367bc15b569749a1458711bc26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Sun, 20 Sep 2015 23:27:39 +0200 Subject: [PATCH] Throw correct error in configuration --- lib/configuration.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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");