mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-09 00:09:24 +01:00
LCL: Add ClassName to an exception message. Issue #41744.
This commit is contained in:
parent
8b4df58c51
commit
986dee38d4
@ -2243,7 +2243,7 @@ function ValidParentForm(Control: TControl; TopForm: Boolean): TCustomForm;
|
|||||||
begin
|
begin
|
||||||
Result := GetParentForm(Control, TopForm);
|
Result := GetParentForm(Control, TopForm);
|
||||||
if Result = nil then
|
if Result = nil then
|
||||||
raise EInvalidOperation.CreateFmt(sParentRequired, [Control.Name]);
|
raise EInvalidOperation.CreateFmt(sParentRequired, [Control.Name+':'+Control.ClassName]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1632,7 +1632,7 @@ end;
|
|||||||
function TControl.GetClientOrigin: TPoint;
|
function TControl.GetClientOrigin: TPoint;
|
||||||
begin
|
begin
|
||||||
if Parent = nil then
|
if Parent = nil then
|
||||||
raise EInvalidOperation.CreateFmt(sParentRequired, [Name]);
|
raise EInvalidOperation.CreateFmt(sParentRequired, [Name+':'+ClassName]);
|
||||||
Result := Parent.ClientOrigin;
|
Result := Parent.ClientOrigin;
|
||||||
Inc(Result.X, FLeft);
|
Inc(Result.X, FLeft);
|
||||||
Inc(Result.Y, FTop);
|
Inc(Result.Y, FTop);
|
||||||
@ -5315,7 +5315,7 @@ end;
|
|||||||
function TControl.GetDeviceContext(var WindowHandle: HWND): HDC;
|
function TControl.GetDeviceContext(var WindowHandle: HWND): HDC;
|
||||||
begin
|
begin
|
||||||
if Parent = nil then
|
if Parent = nil then
|
||||||
raise EInvalidOperation.CreateFmt(sParentRequired, [Name]);
|
raise EInvalidOperation.CreateFmt(sParentRequired, [Name+':'+ClassName]);
|
||||||
|
|
||||||
Result := Parent.GetDeviceContext(WindowHandle);
|
Result := Parent.GetDeviceContext(WindowHandle);
|
||||||
MoveWindowOrgEx(Result, Left, Top);
|
MoveWindowOrgEx(Result, Left, Top);
|
||||||
|
|||||||
@ -1875,9 +1875,9 @@ begin
|
|||||||
AWinControl:=AWinControl.Parent;
|
AWinControl:=AWinControl.Parent;
|
||||||
end;
|
end;
|
||||||
{$IFDEF VerboseFocus}
|
{$IFDEF VerboseFocus}
|
||||||
RaiseGDBException(Format(SCannotFocus,[AWinControl.Name,AWinControl.ClassName]));
|
RaiseGDBException(Format(SCannotFocus,[AWinControl.Name+':'+AWinControl.ClassName]));
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
raise EInvalidOperation.Create(Format(SCannotFocus,[AWinControl.Name,AWinControl.ClassName]));
|
raise EInvalidOperation.Create(Format(SCannotFocus,[AWinControl.Name+':'+AWinControl.ClassName]));
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -7644,7 +7644,7 @@ begin
|
|||||||
if (WndParent = 0) and (Style and WS_CHILD <> 0) then
|
if (WndParent = 0) and (Style and WS_CHILD <> 0) then
|
||||||
begin
|
begin
|
||||||
DebugLn(['TWinControl.CreateWnd ',DbgSName(Self),' Parent=',DbgSName(Parent),' ERROR WndParent=0']);
|
DebugLn(['TWinControl.CreateWnd ',DbgSName(Self),' Parent=',DbgSName(Parent),' ERROR WndParent=0']);
|
||||||
raise EInvalidOperation.CreateFmt(sParentRequired, [Name]);
|
raise EInvalidOperation.CreateFmt(sParentRequired, [Name+':'+ClassName]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@ -230,7 +230,7 @@ resourceString
|
|||||||
sInvalidIndex = 'Invalid ImageList Index';
|
sInvalidIndex = 'Invalid ImageList Index';
|
||||||
sInvalidImageSize = 'Invalid image size';
|
sInvalidImageSize = 'Invalid image size';
|
||||||
sDuplicateMenus = 'Duplicate menus';
|
sDuplicateMenus = 'Duplicate menus';
|
||||||
sCannotFocus = 'Cannot focus a disabled or invisible window "%s":"%s"';
|
sCannotFocus = 'Cannot focus a disabled or invisible window "%s"';
|
||||||
sParentRequired = 'Control "%s" has no parent window.';
|
sParentRequired = 'Control "%s" has no parent window.';
|
||||||
SMaskEditNoMatch = 'The current text does not match the specified mask.';
|
SMaskEditNoMatch = 'The current text does not match the specified mask.';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user