idhttp post 出现exception class EIdSocketError with message 'Socket Error # 10054的解决办法
来源:互联网 发布:飞鹰网络电视 在线 编辑:程序博客网 时间:2024/06/05 16:06
由于项目需要。需要向一个地址提交数据。提交的次数很频繁,但是程序经常raised exception class EIdSocketError with message 'Socket Error # 10054
Connection reset by peer.' 造成程序异常,停止工作。
于是找到以下解决办法。Exception捕获不到该异常。需要用EIdException来捕获异常。
IDE环境: Delphi XE3 Version 17.0.4625.53395
INDY :IDE自带。
v_sparm :TStringList;begin Result:='0'; v_sparm := TStringList.Create; …… Form1.idhtp1.ConnectTimeout := 15000; Form1.idhtp1.ReadTimeout:=15000; …… try …… try Result:=Form1.idhtp1.Post(URL,v_sparm); except on e: EIdException do //用EIdException捕获Socket Error # 10054 Connection reset by peer begin WriteLog(e.Message); //处理异常信息。防止程序挂掉。 end; end; finally end;end;
- idhttp post 出现exception class EIdSocketError with message 'Socket Error # 10054的解决办法
- Exception class EWriteError with message 'Stream write error'.
- smarty出现“Uncaught exception ‘SmartyCompilerException’ with message ‘Syntax Error in template”错误时的解决办
- idhttp的socket error # 10054 错误的处理办法
- Delphi - SuperObject : raised exception class eintoverflow with message'Integer overflow'.
- Delphi Idhttp的post方法
- Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): It is not safe to
- idhttp post
- Delphi Idhttp Post提交 Aspx/Asp.net 时 500错误的解决办法。
- Delphi Idhttp Post提交 Aspx/Asp.net 时 500错误的解决办法。
- raised exception class EAccessViolation with message 'Access violation ataddress 64FF0002. Read of a
- “Project Project1.exe raised exception class EUniError with message 'unavailable database'.Process s
- c++builder:Project Project1.exe raised exception class EAccessViolation with message 'Access violati
- 常见的Exception 和 Error的解决办法
- PHP + mysql 遇到Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error
- Fatal error: Uncaught exception 'PHPExcel_Exception' with message 'Multibyte function overloading in
- Fatal error: Uncaught exception 'RedisException' with message 'Redis server went away'
- BUG排查:PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [1040] Too ma
- 黑马程序员之C#学习笔记:最简单的三层架构学习总结
- C++记录程序崩溃时的dumpfile
- SQLServer内部原理
- tomcat主目录及作用
- 编程语言串烧(一)
- idhttp post 出现exception class EIdSocketError with message 'Socket Error # 10054的解决办法
- 函数指针参数传递问题
- 获取所有子控件
- Eclipse 保存文件时自动格式化代码
- 关于PHP结束标签?>的使用细节
- 模板设计——行为设计模式之一
- Android开发中的控件--ProgressBar和ListView
- 计算接收机钟差改正数-CODSPP
- hadoop namenode的恢复