Data.DB.DatabaseErrorFmt

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure DatabaseErrorFmt(const Message: string; const Args: array of const;
Component: TComponent = nil);

C++

extern DELPHI_PACKAGE void __fastcall DatabaseErrorFmt(const System::UnicodeString Message, const System::TVarRec *Args, const System::NativeInt Args_High, System::Classes::TComponent* Component = (System::Classes::TComponent*)(0x0));

Properties

Type Visibility Source Unit Parent
procedure
function
public
Data.DB.pas
Data.DB.hpp
Data.DB Data.DB

Description

Creates and raises an EDatabaseError exception with a formatted error message.

Call DatabaseError to raise an EDatabaseError exception. The error message for the exception is assembled from the format string specified by the Message parameter and applying the Args parameter. In C++, the Args_Size parameter specifies the index of the last argument in Args (one less than the number of arguments). If a component is provided as the final parameter, the message is prefixed by the name of the component to help in interpreting the error message.In C++, this parameter can be NULL.

Call DatabaseErrorFmt rather than creating and raising the exception directly in code to reduce the overall code size of the application.

See Also