Delphi / Object Pascal · Exception

EReadError Exception

What does EReadError Exception mean in Delphi / Object Pascal?

A descendant of EFilerError raised during component streaming when the reader can't read the number of bytes it expected from the stream - typically a truncated or corrupted DFM/stream, or a property whose stored type no longer matches what the class declares.

EReadError ExceptionDelphi (VCL) · Delphi (FireMonkey)

Condition

A descendant of EFilerError raised during component streaming when the reader can't read the number of bytes it expected from the stream - typically a truncated or corrupted DFM/stream, or a property whose stored type no longer matches what the class declares.

Fix

Verify the stream/DFM wasn't truncated by a failed save or a bad source-control merge, and if a property type changed between versions add a custom Reader/DefineProperties handler to migrate the old stored format instead of letting the load fail.

Related exception