diff --git a/src/openpgp.js b/src/openpgp.js index ef85729b..8f94028b 100644 --- a/src/openpgp.js +++ b/src/openpgp.js @@ -382,7 +382,9 @@ function execute(cmd, errMsg) { */ function onError(message, error) { // log the stack trace - console.error(error.stack); + if (config.debug) { + console.error(error.stack); + } // rethrow new high level error for api users throw new Error(message); }