Only log errors when config.debug is true
This commit is contained in:
parent
316a37a1cd
commit
d67efe22eb
|
@ -382,7 +382,9 @@ function execute(cmd, errMsg) {
|
||||||
*/
|
*/
|
||||||
function onError(message, error) {
|
function onError(message, error) {
|
||||||
// log the stack trace
|
// log the stack trace
|
||||||
console.error(error.stack);
|
if (config.debug) {
|
||||||
|
console.error(error.stack);
|
||||||
|
}
|
||||||
// rethrow new high level error for api users
|
// rethrow new high level error for api users
|
||||||
throw new Error(message);
|
throw new Error(message);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user