Jump to content
Sign in to follow this  
Minh Hoang

Exception class EConvertError issue

Recommended Posts

The project information:

 - Delphi 10.4.3

 - Target: 32-bit release

 - Omni Thread version 3.07.9

 - Windows 11 Home 64-bit

 

When executing in debug mode (F9), the Omni thread raises the exception:

 

image.thumb.png.fa7062b53db8551a049ef2f80a0c0cd4.png

 

When breaking, it lands to OtlTaskControl:

image.thumb.png.af90b574a0614152f397b161f996db04.png

 

It should be mentioned that the project executes normally (no exception)

in mode without debug (Ctrl+Shift+F9).

 

Thank you in advance for any idea.

Share this post


Link to post

Thank you David for your reply!

 

Yes I found the bug of reading then converting the string to DateTime in the code already.

Share this post


Link to post

@Minh Hoang

The error 96/05/2022 10:20:30 is clearly not a valid date.

 

But this format also might lead to the consideration if you are using the appropriate TFormatSettings for the conversion itself.

Since "/ :" separators are used in US mainly, other countries might use different formats, for example in Germany the usual format is "dd.mm.yyyy hh:nn:ss".

 

I think in asian countries you also might have the ". :" separators , which may lead to similar errors when not taking care about them.

Suddenly a program running well in your country might crash in another country.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×