fix: 脚本发布错误将异常退出

This commit is contained in:
ZhaoLei 2024-11-28 09:30:46 +08:00
parent cc947ba969
commit be4e8124bf

View file

@ -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);
} }
})(); })();