Delphi EVariantTypeCastError错误的解决方法

时间:2022-03-22 10:52:41

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

---------------------------
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.Delphi EVariantTypeCastError错误的解决方法

 

2.Delphi EVariantTypeCastError错误的解决方法