DBG: Exception handling

git-svn-id: trunk@32794 -
This commit is contained in:
martin 2011-10-10 09:33:26 +00:00
parent f9810a2611
commit bfd5aebbd4
2 changed files with 21 additions and 11 deletions

View File

@ -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);

View File

@ -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.',