Skip to content
Snippets Groups Projects
Commit edd81782 authored by Daniel's avatar Daniel
Browse files

Log exception message instead of generic error message

It is better to log the actual error message, because a exception can have different causes. For example: In the current implementation a syntax error, in a config file, will produce 'Cannot find ${configPath}'. Because this is misleading, this commit changes the behavior to log the actual exception message (f. e. 'Unable to compile TypeScript').
parent 15e663cc
No related branches found
No related tags found
No related merge requests found
......@@ -11,10 +11,9 @@ const getConfig = (path: string, env: string): any => {
config = require(configPath);
} catch (e) {
config = null;
util.log(util.colors.red(e.message));
}
if (!config) {
util.log(util.colors.red(`Cannot find ${configPath}`));
}
return config;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment