System.Classes.EComponentError

From RAD Studio API Documentation
Jump to: navigation, search

System.SysUtils.ExceptionSystem.TObjectEComponentError

Delphi

EComponentError = class(Exception);

C++

class PASCALIMPLEMENTATION EComponentError : public System::Sysutils::Exception

Properties

Type Visibility Source Unit Parent
class public
System.Classes.pas
System.Classes.hpp
System.Classes System.Classes

Description

EComponentError is the exception class for registering and renaming components.

EComponentError is raised when:

  • An attempt to register a component fails.
  • An application cannot rename a component.
  • (Windows-only) A request is made to retrieve the COM interface of a component that does not support COM.

To register a component, write a procedure called "Register", declared in the interface section (Delphi) or namespace (C++) of the component's unit file. Note that unlike most Delphi procedure names, the name of the Register procedure is case-sensitive. Register must call RegisterComponents for each component you want to register.

Failure to rename a component occurs when an application tries to rename the component at run time, and the new name is the same as the name of another component with the same Owner, or is not a valid identifier.

See Also