mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 07:22:20 +02:00
DBG: Exception handling
git-svn-id: trunk@32794 -
This commit is contained in:
parent
f9810a2611
commit
bfd5aebbd4
@ -169,7 +169,11 @@ begin
|
|||||||
Step:=0;
|
Step:=0;
|
||||||
Application.Idle(false);
|
Application.Idle(false);
|
||||||
end;
|
end;
|
||||||
Application.ProcessMessages;
|
try
|
||||||
|
Application.ProcessMessages;
|
||||||
|
except
|
||||||
|
Application.HandleException(Application);
|
||||||
|
end;
|
||||||
if Application.Terminated then Break;
|
if Application.Terminated then Break;
|
||||||
until R <> 0;
|
until R <> 0;
|
||||||
|
|
||||||
@ -244,7 +248,11 @@ begin
|
|||||||
Step:=0;
|
Step:=0;
|
||||||
Application.Idle(false);
|
Application.Idle(false);
|
||||||
end;
|
end;
|
||||||
Application.ProcessMessages;
|
try
|
||||||
|
Application.ProcessMessages;
|
||||||
|
except
|
||||||
|
Application.HandleException(Application);
|
||||||
|
end;
|
||||||
if Application.Terminated then Break;
|
if Application.Terminated then Break;
|
||||||
// sleep a bit
|
// sleep a bit
|
||||||
Sleep(10);
|
Sleep(10);
|
||||||
|
@ -10541,15 +10541,17 @@ begin
|
|||||||
except
|
except
|
||||||
on e: Exception do begin
|
on e: Exception do begin
|
||||||
try
|
try
|
||||||
debugln(['ERROR: Exception occured in DoExecute '+e.ClassName + ' Msg="'+ e.Message + '" Addr=', dbgs(ExceptAddr)]);
|
debugln(['ERROR: Exception occured in DoExecute '+e.ClassName + ' Msg="'+ e.Message + '" Addr=', dbgs(ExceptAddr)]);
|
||||||
Report := BackTraceStrFunc(ExceptAddr);
|
Report := BackTraceStrFunc(ExceptAddr);
|
||||||
Report2 := Report;
|
Report2 := Report;
|
||||||
Frames := ExceptFrames;
|
Frames := ExceptFrames;
|
||||||
for I := 0 to ExceptFrameCount - 1 do
|
for I := 0 to ExceptFrameCount - 1 do begin
|
||||||
Report := Report + LineEnding + BackTraceStrFunc(Frames[I]);
|
Report := Report + LineEnding + BackTraceStrFunc(Frames[I]);
|
||||||
if i < 5
|
if i < 5
|
||||||
then Report2 := Report;
|
then Report2 := Report;
|
||||||
except end;
|
end;
|
||||||
|
except
|
||||||
|
end;
|
||||||
debugln(Report);
|
debugln(Report);
|
||||||
|
|
||||||
if MessageDlg('The debugger experienced an unknown condition.',
|
if MessageDlg('The debugger experienced an unknown condition.',
|
||||||
|
Loading…
Reference in New Issue
Block a user