mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 17:29:31 +02:00
added stack trace when codetools get unexpected exception
git-svn-id: trunk@8496 -
This commit is contained in:
parent
ea1f8f2365
commit
3a32e8a2d3
@ -553,6 +553,20 @@ begin
|
|||||||
Result:=CodeToolBoss.GetOwnerForCodeTreeNode(ANode);
|
Result:=CodeToolBoss.GetOwnerForCodeTreeNode(ANode);
|
||||||
end;
|
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 }
|
{ TCodeToolManager }
|
||||||
|
|
||||||
@ -1190,6 +1204,7 @@ begin
|
|||||||
fErrorCode:=nil;
|
fErrorCode:=nil;
|
||||||
end else begin
|
end else begin
|
||||||
// unknown exception
|
// unknown exception
|
||||||
|
DumpExceptionBackTrace;
|
||||||
FErrorMsg:=AnException.ClassName+': '+FErrorMsg;
|
FErrorMsg:=AnException.ClassName+': '+FErrorMsg;
|
||||||
if FCurCodeTool<>nil then begin
|
if FCurCodeTool<>nil then begin
|
||||||
fErrorCode:=FCurCodeTool.ErrorPosition.Code;
|
fErrorCode:=FCurCodeTool.ErrorPosition.Code;
|
||||||
|
@ -100,8 +100,9 @@ const
|
|||||||
|
|
||||||
// WGL_ARB_pbuffer
|
// WGL_ARB_pbuffer
|
||||||
type
|
type
|
||||||
HPBUFFERARB = Integer;
|
HPBUFFERARB = Integer;
|
||||||
TGLenum = uint;
|
TGLenum = uint;
|
||||||
|
|
||||||
const
|
const
|
||||||
WGL_DRAW_TO_PBUFFER_ARB = $202D;
|
WGL_DRAW_TO_PBUFFER_ARB = $202D;
|
||||||
WGL_MAX_PBUFFER_PIXELS_ARB = $202E;
|
WGL_MAX_PBUFFER_PIXELS_ARB = $202E;
|
||||||
@ -223,12 +224,13 @@ function LOpenGLCreateContext(AWinControl: TWinControl;
|
|||||||
WSPrivate: TWSPrivateClass; SharedControl: TWinControl; AttrList: PInteger
|
WSPrivate: TWSPrivateClass; SharedControl: TWinControl; AttrList: PInteger
|
||||||
): HWND;
|
): HWND;
|
||||||
begin
|
begin
|
||||||
|
InitWGL;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure InitWGL;
|
procedure InitWGL;
|
||||||
var
|
var
|
||||||
buffer: string;
|
Buffer: string;
|
||||||
|
|
||||||
// Checks if the given Extension string is in Buffer.
|
// Checks if the given Extension string is in Buffer.
|
||||||
function CheckExtension(const extension : String) : Boolean;
|
function CheckExtension(const extension : String) : Boolean;
|
||||||
|
Loading…
Reference in New Issue
Block a user