added stack trace when codetools get unexpected exception

git-svn-id: trunk@8496 -
This commit is contained in:
mattias 2006-01-11 09:55:30 +00:00
parent ea1f8f2365
commit 3a32e8a2d3
2 changed files with 21 additions and 4 deletions

View File

@ -553,6 +553,20 @@ begin
Result:=CodeToolBoss.GetOwnerForCodeTreeNode(ANode);
end;
procedure DumpExceptionBackTrace;
var
FrameCount: integer;
Frames: PPointer;
FrameNumber:Integer;
begin
DebugLn('Codetools Stack trace:');
DebugLn(BackTraceStrFunc(ExceptAddr));
FrameCount:=ExceptFrameCount;
Frames:=ExceptFrames;
for FrameNumber := 0 to FrameCount-1 do
DebugLn(BackTraceStrFunc(Frames[FrameNumber]));
end;
{ TCodeToolManager }
@ -1190,6 +1204,7 @@ begin
fErrorCode:=nil;
end else begin
// unknown exception
DumpExceptionBackTrace;
FErrorMsg:=AnException.ClassName+': '+FErrorMsg;
if FCurCodeTool<>nil then begin
fErrorCode:=FCurCodeTool.ErrorPosition.Code;

View File

@ -100,8 +100,9 @@ const
// WGL_ARB_pbuffer
type
HPBUFFERARB = Integer;
TGLenum = uint;
HPBUFFERARB = Integer;
TGLenum = uint;
const
WGL_DRAW_TO_PBUFFER_ARB = $202D;
WGL_MAX_PBUFFER_PIXELS_ARB = $202E;
@ -223,12 +224,13 @@ function LOpenGLCreateContext(AWinControl: TWinControl;
WSPrivate: TWSPrivateClass; SharedControl: TWinControl; AttrList: PInteger
): HWND;
begin
InitWGL;
end;
procedure InitWGL;
var
buffer: string;
Buffer: string;
// Checks if the given Extension string is in Buffer.
function CheckExtension(const extension : String) : Boolean;