From 684fc87eb7ac8971950cd25f9392cbb9cb53be9b Mon Sep 17 00:00:00 2001 From: Mykola Mokhnach Date: Fri, 13 Dec 2024 14:49:34 +0100 Subject: [PATCH] chore: Replace occurrences of the deprecated errorAndThrow API (#131) --- lib/commands/record-screen.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/commands/record-screen.js b/lib/commands/record-screen.js index 30c271f..be770cd 100644 --- a/lib/commands/record-screen.js +++ b/lib/commands/record-screen.js @@ -147,8 +147,10 @@ class ScreenRecorder { }); } catch (e) { await this._enforceTermination(); - this.log.errorAndThrow(`The expected screen record file '${this._videoPath}' does not exist after ${STARTUP_TIMEOUT_MS}ms. ` + - `Check the server log for more details`); + throw this.log.errorWithException( + `The expected screen record file '${this._videoPath}' does not exist after ${STARTUP_TIMEOUT_MS}ms. ` + + `Check the server log for more details` + ); } this._timer = setTimeout(async () => { if (this.isRunning) {