fix: 脚本发布错误将异常退出
This commit is contained in:
parent
cc947ba969
commit
be4e8124bf
1 changed files with 4 additions and 1 deletions
|
@ -270,9 +270,12 @@ async function connectWebSocket() {
|
||||||
// }
|
// }
|
||||||
// PrintSuccessInNewLine("11")
|
// PrintSuccessInNewLine("11")
|
||||||
await connectWebSocket();
|
await connectWebSocket();
|
||||||
|
if (!IsSuccess) {
|
||||||
|
throw new Error("发布失败");
|
||||||
|
}
|
||||||
// console.log('WebSocket has closed');
|
// console.log('WebSocket has closed');
|
||||||
// The script will wait here until the WebSocket connection is closed
|
// The script will wait here until the WebSocket connection is closed
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error("Failed to connect or an error occurred:", err);
|
throw new Error(err);
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
Loading…
Reference in a new issue