System.Variants.HandleConversionException

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure HandleConversionException(const ASourceType, ADestType: TVarType);

C++

extern DELPHI_PACKAGE void __fastcall HandleConversionException(const System::Word ASourceType, const System::Word ADestType);

Properties

Type Visibility Source Unit Parent
procedure
function
public
System.Variants.pas
System.Variants.hpp
System.Variants System.Variants

Description

Handles exceptions during variant type conversions.

HandleConversionException handles exceptions resulting from attempts to convert between variant types. Code that implements such conversions should call HandleConversionException when a conversion throws an exception.

ASourceType and ADestType indicate the variant types of the source and destination. HandleConversionException uses these to format an appropriate error string. If the current exception corresponds to a variant exception, HandleConversionException raises that exception. Otherwise, HandleConversionException simply re-raises the original exception.

See Also