dio icon indicating copy to clipboard operation
dio copied to clipboard

DioErrorType.CONNECT_TIMEOUT异常无法处理,总是给我抛出!

Open ddxl123 opened this issue 6 years ago • 9 comments

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)会被执行。

ddxl123 avatar Mar 06 '20 08:03 ddxl123

me too..

devSC avatar Mar 21 '20 16:03 devSC

me too..

huscarter avatar Apr 13 '20 13:04 huscarter

me too

kennenfromchina avatar Apr 21 '20 01:04 kennenfromchina

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.

stale[bot] avatar May 21 '20 04:05 stale[bot]

any update on this? It happened to me as well. Please fix this..

furatamasensei avatar Jun 27 '20 13:06 furatamasensei

me too

heimabailang avatar Aug 31 '20 08:08 heimabailang

the same

z234009184 avatar Sep 07 '20 02:09 z234009184

me too. Do you have a solution?

sj1910 avatar Nov 12 '20 02:11 sj1910

me too

hiperioncn avatar Sep 26 '21 09:09 hiperioncn