diff --git a/lib/preprocessor.js b/lib/preprocessor.js index e64826d7b..40430ddfa 100644 --- a/lib/preprocessor.js +++ b/lib/preprocessor.js @@ -26,12 +26,17 @@ var createPreprocessor = function(config, basePath, injector) { preprocessors.shift()(content, file, nextPreprocessor); }; - var instantiatePreprocessor = function(preprocessorName) { + var instantiatePreprocessor = function(name) { try { - preprocessors.push(injector.get('preprocessor:' + preprocessorName)); + preprocessors.push(injector.get('preprocessor:' + name)); } catch (e) { // TODO(vojta): log warning only once per each preprocessor - log.warn('Pre-processor "%s" is not registered!', preprocessorName); + if (e.message.indexOf('No provider for "preprocessor:' + name + '"') !== -1) { + log.warn('Can not load "%s", it is not registered!\n ' + + 'Perhaps you are missing some plugin?', name); + } else { + log.warn('Can not load "%s"!\n ' + e.stack, name); + } } };