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;
Application.Idle(false);
end;
Application.ProcessMessages;
try
Application.ProcessMessages;
except
Application.HandleException(Application);
end;
if Application.Terminated then Break;
until R <> 0;
@ -244,7 +248,11 @@ begin
Step:=0;
Application.Idle(false);
end;
Application.ProcessMessages;
try
Application.ProcessMessages;
except
Application.HandleException(Application);
end;
if Application.Terminated then Break;
// sleep a bit
Sleep(10);

View File

@ -10541,15 +10541,17 @@ begin
except
on e: Exception do begin
try
debugln(['ERROR: Exception occured in DoExecute '+e.ClassName + ' Msg="'+ e.Message + '" Addr=', dbgs(ExceptAddr)]);
Report := BackTraceStrFunc(ExceptAddr);
Report2 := Report;
Frames := ExceptFrames;
for I := 0 to ExceptFrameCount - 1 do
Report := Report + LineEnding + BackTraceStrFunc(Frames[I]);
if i < 5
then Report2 := Report;
except end;
debugln(['ERROR: Exception occured in DoExecute '+e.ClassName + ' Msg="'+ e.Message + '" Addr=', dbgs(ExceptAddr)]);
Report := BackTraceStrFunc(ExceptAddr);
Report2 := Report;
Frames := ExceptFrames;
for I := 0 to ExceptFrameCount - 1 do begin
Report := Report + LineEnding + BackTraceStrFunc(Frames[I]);
if i < 5
then Report2 := Report;
end;
except
end;
debugln(Report);
if MessageDlg('The debugger experienced an unknown condition.',