张志峰的博客

水滴石川,积少成多。

导航

Delphi EVariantTypeCastError错误的解决方法

Posted on 2013-09-16 16:50  ╰★张志峰★╮  阅读(1077)  评论(0编辑  收藏  举报

在执行程序的时候总是提示:

---------------------------
Debugger Exception Notification
---------------------------
Project PrintErp.exe raised exception class EVariantTypeCastError with message '无法将变量从类型 (String) 转换为类型 (Double)。'. Process stopped. Use Step or Run to continue.
---------------------------
OK   Help  
---------------------------

其实这个是类型转换的问题,  简单的方法就是屏蔽这样的异常

 

delphi->Tools->Debugger Options->Language Excetpions 页面的stop on delphi exception

如图:

1.

 

2.