mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 12:39:29 +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);
|
||||
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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user