DioErrorType.CONNECT_TIMEOUT异常无法处理,总是给我抛出!
New Issue Checklist
- [x] I have searched for a similar issue in the project and found none
Issue Info
| Dio Version: all version 我尝试了任何版本,都会出现这个问题,但是我始终没解决,只有在断点里的Uncaught Exceptions去掉勾选才能不抛出,但这并不是解决方案!
Issue Description and Steps
try {
Dio dio = new Dio();
dio.options.connectTimeout = 5000; // 服务器链接超时,毫秒
Response res = await dio.post(
url,
data: data,
options: Options(contentType: "application/x-www-form-urlencoded"),
);
} catch (e) {
print(e);
}
抛出DioError (DioError [DioErrorType.CONNECT_TIMEOUT]: Connecting timed out [5000ms])
异常后,我点击“单步跳过(F10)”,print(e)会被执行。
me too..
me too..
me too
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, please make sure it is up to date and if so, add a comment that this is still an issue to keep it open. Thank you for your contributions.
any update on this? It happened to me as well. Please fix this..
me too
the same
me too. Do you have a solution?
me too