diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-02-22 10:11:44 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-02-22 10:11:44 +0100 |
commit | de31b900803892ef0a441ccffba5d5f6a6c42105 (patch) | |
tree | 555addb3679a767c2f51b253d40feb9016638c28 /lib/utils | |
parent | ccc585ca1fd47ea6cb24cf16b82fd58304840d9c (diff) | |
download | gitbook-de31b900803892ef0a441ccffba5d5f6a6c42105.zip gitbook-de31b900803892ef0a441ccffba5d5f6a6c42105.tar.gz gitbook-de31b900803892ef0a441ccffba5d5f6a6c42105.tar.bz2 |
Add validation of plugin's config after loading
Diffstat (limited to 'lib/utils')
-rw-r--r-- | lib/utils/error.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/utils/error.js b/lib/utils/error.js index 53d8221..52281bf 100644 --- a/lib/utils/error.js +++ b/lib/utils/error.js @@ -55,6 +55,12 @@ var PluginError = WrappedError({ plugin: null }); +// Error for nunjucks templates +var ConfigurationError = WrappedError({ + message: 'Error with book\'s configuration: {origMessage}', + type: 'configuration' +}); + // Deprecate methods/fields function deprecateMethod(fn, msg) { return deprecated.method(msg, log.warn.ln, fn); @@ -74,6 +80,7 @@ module.exports = { TemplateError: TemplateError, PluginError: PluginError, + ConfigurationError: ConfigurationError, deprecateMethod: deprecateMethod, deprecateField: deprecateField |