Is there a way to check whether a Delphi TDateTime
variable has valid contents without trapping exceptions on conversions?
I have written an application that has to parse through hundreds of huge files written as raw Delphi records that contain a TDateTime
field. Occasionally I get a record where the contents has a TDateTime
value like 2.0927117954e+262
which gives a Floating point invalid Operation
exception when passed to conversion routines. I know I can simply trap the exception but this is such a nuisance when debugging as the debugger keeps stopping and I want to keep it enabled in case of other errors.