diff --git a/lib/tools/apk-utils.js b/lib/tools/apk-utils.js index 352c4dc3..f4728618 100644 --- a/lib/tools/apk-utils.js +++ b/lib/tools/apk-utils.js @@ -1195,10 +1195,10 @@ apkUtilsMethods.activateApp = async function activateApp (appId) { output = await this.shell(cmd); log.debug(`Command stdout: ${output}`); } catch (e) { - log.errorAndThrow(`Cannot activate '${appId}'. Original error: ${e.message}`); + throw log.errorWithException(`Cannot activate '${appId}'. Original error: ${e.message}`); } if (output.includes('monkey aborted')) { - log.errorAndThrow(`Cannot activate '${appId}'. Are you sure it is installed?`); + throw log.errorWithException(`Cannot activate '${appId}'. Are you sure it is installed?`); } return; } diff --git a/lib/tools/system-calls.js b/lib/tools/system-calls.js index 4de91164..26c363e8 100644 --- a/lib/tools/system-calls.js +++ b/lib/tools/system-calls.js @@ -1143,8 +1143,8 @@ systemCallMethods.reboot = async function reboot (retries = DEFAULT_ADB_REBOOT_R if ((await this.getDeviceProperty('sys.boot_completed')) === '1') { return; } - // we don't want the stack trace, so no log.errorAndThrow const msg = `Reboot is not completed after ${timer.getDuration().asMilliSeconds.toFixed(0)}ms`; + // we don't want the stack trace log.debug(msg); throw new Error(msg); });