try catch 一直捕获不了异常
WebSocket connection to 'ws://xxxxx:xxxx/' failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT
异常发生在new websocket对象那里,
网上看的onerror也没啥用啊
try catch 一直捕获不了异常
WebSocket connection to 'ws://xxxxx:xxxx/' failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT
异常发生在new websocket对象那里,
网上看的onerror也没啥用啊
10 回答11.1k 阅读
6 回答3k 阅读
5 回答4.8k 阅读✓ 已解决
4 回答3.1k 阅读✓ 已解决
2 回答2.7k 阅读✓ 已解决
3 回答1.4k 阅读✓ 已解决
3 回答2.3k 阅读✓ 已解决
js中是不能catch住websocket的超时error的,这个是设计的限制。可以参考https://stackoverflow.com/que...