Skip to content

TBoldFailureReason

Instances of this class contain information about why a certain operation was not permitted.

Unit: BoldSystem

Declaration

TBoldFailureReason = class(TObject)

Hierarchy

  1. TObject
  2. TBoldFailureReason
  3. Direct subclasses
  4. TBoldFailureGetLocksFailed

Description

Instances of this class contain information about why a certain operation was not permitted.

Properties

Name Summary Notes
MessageFormatStr BoldRaiseLastFailure uses this message for building the exception message.
Originator Domain element that caused the failure. read-only
Reason String describing the failure read-only

MessageFormatStr

property MessageFormatStr: String;

BoldRaiseLastFailure uses this message for building the exception message.

The actual message of the exception that will be raised will be created by sending property to format with the following arguments:

format(MessageFormatString, [OriginatorName, MethodName, Message]);

Originator

property Originator: TBoldDomainElement;

Domain element that caused the failure.

Reason

property Reason: string;

String describing the failure

Methods

Name Summary Notes
create Constructor with reason and originator
CreateFmt Constructor with Format arguments
destroy Destructor override
GetException The class of the exception to raise in BoldRaiseLastFailure. protected, virtual

create

constructor create(reason: String; Originator: TBoldDomainElement);

Constructor with reason and originator. Reason is a string describing the failure. Originator is the domain element that caused the failure, and may be **nil**.

CreateFmt

constructor CreateFmt(Reason: string; const args: array of const; Originator: TBoldDomainElement);

The Reason and args arguments work the same way as for the Format function. Originator is domain element that caused the failure, and may be **nil**.

destroy

destructor destroy; override;

Destructor

GetException

function GetException(const Msg: String): EBoldFailure; virtual;

Subclasses may override this method to provide the class of the exception to raise when BoldRaiseLastFailure is called.


Generated from the Bold 4.0 help (Help/BfD.chm) by Tools/chm2mkdocs.py; member lists reflect Bold 4.0, see the source for members added since.