How to handle "Error using asyncio.Me​ssageHandl​er/onError​"

23 ビュー (過去 30 日間)
Harsh Sonani
Harsh Sonani 2021 年 11 月 16 日
回答済み: Abhiram 2025 年 1 月 27 日 6:17
Hi, i am using MATLAB R2017b, i have devloped one gui and i am connecting it to server board with tcpclient() function, i want to know how to handle "Error using asyncio.MessageHandler/onError" error while i am sending data to board and ethernet is disconnected, i have used try/catch block to handle it but still error is getting and also i have used ErrorOccurredFcn but i am getting error like ErrorOccurredFcn property is not supported
  1 件のコメント
Bérenger
Bérenger 2023 年 5 月 16 日
Hi. Ihave the same problem. Iwould like to know if you found a solution.
On the other hand I manage to send some data, except when I send data which consists of server sending data that,s whent it crashes.

サインインしてコメントする。

回答 (1 件)

Abhiram
Abhiram 2025 年 1 月 27 日 6:17
Hi Harsh,
I understand that you are employing MATLAB's "tcpclient" function to initiate a connection with a server, and you wish to detect server disconnections and manage the error suitably.
There is no workaround currently for MATLAB R2017b. However, for MATLAB versions R2021b and later, a workaround can be implemented as described in the given thread:

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by