diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-09-20 23:27:39 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-09-20 23:27:39 +0200 |
commit | 813210bf470308367bc15b569749a1458711bc26 (patch) | |
tree | 04b0f919a68d020d414ffc3d0bc55e85ff6dcbd2 /lib/configuration.js | |
parent | c372dfc5442a8d5e35491ad21f74ead62166a50a (diff) | |
download | gitbook-813210bf470308367bc15b569749a1458711bc26.zip gitbook-813210bf470308367bc15b569749a1458711bc26.tar.gz gitbook-813210bf470308367bc15b569749a1458711bc26.tar.bz2 |
Throw correct error in configuration
Diffstat (limited to 'lib/configuration.js')
-rw-r--r-- | lib/configuration.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/configuration.js b/lib/configuration.js index b3bc146..e176f80 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"); |