System.Classes.TReader.OnError

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnError: TReaderError read FOnError write FOnError;

C++

__property TReaderError OnError = {read=FOnError, write=FOnError};

Properties

Type Visibility Source Unit Parent
event public
System.Classes.pas
System.Classes.hpp
System.Classes TReader

Description

Occurs when a reader object encounters an error reading its data, such as reading the name of an undeclared property or an illegal value.

OnError is used internally by the IDE to report errors. It can also be used to write an event handler to selectively choose to process or ignore errors.

The last parameter passed to the OnError event handler, Handled, is passed by reference. By default, the Error method passes false in Handled, but a handler that corrects the error or chooses to ignore the error can set Handled to true, which prevents further processing of the error. If the event handler returns with Handler still set to false, the reader object raises an EReadError exception.

See Also