mirror of
https://github.com/openpgpjs/openpgpjs.git
synced 2026-03-18 14:19:15 +00:00
Only log errors when config.debug is true
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user