lcl: change OnExceptionCircle to OnCircularException, remove handler list.

git-svn-id: trunk@52730 -
This commit is contained in:
ondrej 2016-07-20 18:01:57 +00:00
parent ccdd31bd57
commit 6f5fa419e8
3 changed files with 6 additions and 34 deletions

View File

@ -5841,8 +5841,6 @@
<notes><note>?</note><note>application/taskbar window?</note><note>purpose?</note><note>what's the purpose for *not* returning MainForm.Handle???</note>
</notes>
</element>
<element name="TApplicationHandlerType.ahtExceptionCircle"><short>Handler invoked when there is an exception circle before killing the app with Halt</short>
</element>
<!-- pointer type Visibility: default -->
<element name="PAsyncCallQueueItem" link="TAsyncCallQueueItem">
<short>A queued asynchronous callback request node.</short>
@ -9319,13 +9317,7 @@ Before 0.9.31 there was no exception. Therefore some resourceless forms might us
<errors/>
<seealso/>
</element>
<element name="TApplication.OnExceptionCircle"><short>Handler invoked when there is an exception circle before killing the app with Halt</short>
</element>
<element name="TApplication.AddOnExceptionCircleHandler"><short>Adds an application exception circle handler.</short><seealso><link id="TApplicationHandlerType.ahtExceptionCircle"/>
</seealso>
</element>
<element name="TApplication.RemoveOnExceptionCircleHandler"><short>Removes an application exception circle handler.</short><seealso><link id="TApplicationHandlerType.ahtExceptionCircle"/>
</seealso>
<element name="TApplication.OnCircularException"><short>Handler invoked when there is an exception circle before killing the app with Halt</short>
</element>
</module>
<!-- Forms -->

View File

@ -1218,8 +1218,7 @@ type
ahtHelp,
ahtHint,
ahtShowHint,
ahtGetMainFormHandle,
ahtExceptionCircle
ahtGetMainFormHandle
);
PAsyncCallQueueItem = ^TAsyncCallQueueItem;
@ -1301,7 +1300,7 @@ type
FMainFormOnTaskBar: Boolean;
FModalLevel: Integer;
FMoveFormFocusToChildren: Boolean;
FOnExceptionCircle: TExceptionEvent;
FOnCircularException: TExceptionEvent;
FOnGetMainFormHandle: TGetHandleEvent;
FOnMessageDialogFinished: TModalDialogFinished;
FOnModalBegin: TNotifyEvent;
@ -1468,8 +1467,6 @@ type
procedure RemoveOnDeactivateHandler(Handler: TNotifyEvent);
procedure AddOnExceptionHandler(Handler: TExceptionEvent; AsFirst: Boolean=true);
procedure RemoveOnExceptionHandler(Handler: TExceptionEvent);
procedure AddOnExceptionCircleHandler(Handler: TExceptionEvent; AsFirst: Boolean=true);
procedure RemoveOnExceptionCircleHandler(Handler: TExceptionEvent);
procedure AddOnEndSessionHandler(Handler: TNotifyEvent; AsFirst: Boolean=true);
procedure RemoveOnEndSessionHandler(Handler: TNotifyEvent);
procedure AddOnQueryEndSessionHandler(Handler: TQueryEndSessionEvent; AsFirst: Boolean=true);
@ -1566,7 +1563,7 @@ type
property OnShowHint: TShowHintEvent read FOnShowHint write FOnShowHint;
property OnUserInput: TOnUserInputEvent read FOnUserInput write FOnUserInput;
property OnDestroy: TNotifyEvent read FOnDestroy write FOnDestroy;
property OnExceptionCircle: TExceptionEvent read FOnExceptionCircle write FOnExceptionCircle;
property OnCircularException: TExceptionEvent read FOnCircularException write FOnCircularException;
property ShowButtonGlyphs: TApplicationShowGlyphs read FShowButtonGlyphs write SetShowButtonGlyphs default sbgAlways;
property ShowMenuGlyphs: TApplicationShowGlyphs read FShowMenuGlyphs write SetShowMenuGlyphs default sbgAlways;
property ShowHint: Boolean read FShowHint write SetShowHint;

View File

@ -1195,14 +1195,8 @@ begin
DebugLn('TApplication.HandleException: ',
'there was another exception during showing the first exception');
if (ExceptObject is Exception) then
begin
if Assigned(OnExceptionCircle) then
OnExceptionCircle(Sender, Exception(ExceptObject));
i := FApplicationHandlers[ahtExceptionCircle].Count;
while FApplicationHandlers[ahtException].NextDownIndex(i) do
TExceptionEvent(FApplicationHandlers[ahtExceptionCircle][i])(Sender, Exception(ExceptObject));
end;
if Assigned(OnCircularException) and (ExceptObject is Exception) then
OnCircularException(Sender, Exception(ExceptObject));
HaltingProgram:=true;
DumpExceptionBackTrace;
@ -1813,22 +1807,11 @@ begin
AddHandler(ahtEndSession,TMethod(Handler),AsFirst);
end;
procedure TApplication.AddOnExceptionCircleHandler(Handler: TExceptionEvent;
AsFirst: Boolean);
begin
AddHandler(ahtExceptionCircle,TMethod(Handler),AsFirst);
end;
procedure TApplication.RemoveOnEndSessionHandler(Handler: TNotifyEvent);
begin
RemoveHandler(ahtEndSession,TMethod(Handler));
end;
procedure TApplication.RemoveOnExceptionCircleHandler(Handler: TExceptionEvent);
begin
RemoveHandler(ahtExceptionCircle,TMethod(Handler));
end;
procedure TApplication.AddOnQueryEndSessionHandler(
Handler: TQueryEndSessionEvent; AsFirst: Boolean);
begin