mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-21 03:21:24 +02:00
Fix several occurrences of raise exception('some string'), in effect casting a string into an exception, instead of raise exception.create(). Issue #40860. Patch by n7800 (slightly modified).
(cherry picked from commit db6ed214b9
)
This commit is contained in:
parent
d81e62425d
commit
452adce230
@ -461,7 +461,7 @@ var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
if m_attr_storage.size = 0 then
|
if m_attr_storage.size = 0 then
|
||||||
raise svg_exception(PChar('end_path : The path was not begun' ) );
|
raise svg_exception.Construct(PChar('end_path : The path was not begun' ) );
|
||||||
|
|
||||||
attr.Construct(cur_attr );
|
attr.Construct(cur_attr );
|
||||||
|
|
||||||
@ -636,7 +636,7 @@ end;
|
|||||||
procedure path_renderer.pop_attr;
|
procedure path_renderer.pop_attr;
|
||||||
begin
|
begin
|
||||||
if m_attr_stack.size = 0 then
|
if m_attr_stack.size = 0 then
|
||||||
raise svg_exception(PChar('pop_attr : Attribute stack is empty' ) );
|
raise svg_exception.Construct(PChar('pop_attr : Attribute stack is empty' ) );
|
||||||
|
|
||||||
m_attr_stack.remove_last;
|
m_attr_stack.remove_last;
|
||||||
|
|
||||||
|
@ -4394,10 +4394,10 @@ var
|
|||||||
begin
|
begin
|
||||||
// do some checks
|
// do some checks
|
||||||
if (Index<0) then
|
if (Index<0) then
|
||||||
raise Exception('TListPropertyEditor.GetElement Index='+IntToStr(Index));
|
raise Exception.Create('TListPropertyEditor.GetElement Index='+IntToStr(Index));
|
||||||
ElementCount:=GetElementCount;
|
ElementCount:=GetElementCount;
|
||||||
if Index>=ElementCount then
|
if Index>=ElementCount then
|
||||||
raise Exception('TListPropertyEditor.GetElement Index='+IntToStr(Index)
|
raise Exception.Create('TListPropertyEditor.GetElement Index='+IntToStr(Index)
|
||||||
+' Count='+IntToStr(ElementCount));
|
+' Count='+IntToStr(ElementCount));
|
||||||
// get element
|
// get element
|
||||||
if not IsSaving then
|
if not IsSaving then
|
||||||
|
Loading…
Reference in New Issue
Block a user