mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 10:47:58 +02:00
gtk2 interface: use RaiseGDBException
git-svn-id: trunk@9873 -
This commit is contained in:
parent
755fdd0473
commit
1af28eb5e6
@ -194,17 +194,17 @@ constructor TGtkListStoreStringList.Create(ListStore : PGtkListStore;
|
||||
ColumnIndex : Integer; TheOwner: TWinControl);
|
||||
begin
|
||||
inherited Create;
|
||||
if ListStore = nil then RaiseException(
|
||||
if ListStore = nil then RaiseGDBException(
|
||||
'TGtkListStoreStringList.Create Unspecified list store');
|
||||
FGtkListStore:= ListStore;
|
||||
|
||||
if (ColumnIndex < 0) or
|
||||
(ColumnIndex >= gtk_tree_model_get_n_columns(GTK_TREE_MODEL(ListStore)))
|
||||
then
|
||||
RaiseException('TGtkListStoreStringList.Create Invalid Column Index');
|
||||
RaiseGDBException('TGtkListStoreStringList.Create Invalid Column Index');
|
||||
FColumnIndex:=ColumnIndex;
|
||||
|
||||
if TheOwner = nil then RaiseException(
|
||||
if TheOwner = nil then RaiseGDBException(
|
||||
'TGtkListStoreStringList.Create Unspecified owner');
|
||||
FOwner:=TheOwner;
|
||||
Include(FStates,glsItemCacheNeedsUpdate);
|
||||
@ -273,7 +273,7 @@ var
|
||||
ListItem : TGtkTreeIter;
|
||||
begin
|
||||
if (Index < 0) or (Index >= Count) then
|
||||
RaiseException('TGtkListStoreStringList.PutObject Out of bounds.')
|
||||
RaiseGDBException('TGtkListStoreStringList.PutObject Out of bounds.')
|
||||
else if FGtkListStore<>nil then begin
|
||||
UpdateItemCache;
|
||||
ListItem:=FCachedItems[Index];
|
||||
@ -351,7 +351,7 @@ begin
|
||||
if ((Source is TGtkListStoreStringList)
|
||||
and (TGtkListStoreStringList(Source).FGtkListStore=FGtkListStore))
|
||||
then
|
||||
RaiseException('TGtkListStoreStringList.Assign: There are 2 lists with the same FGtkListStore');
|
||||
RaiseGDBException('TGtkListStoreStringList.Assign: There are 2 lists with the same FGtkListStore');
|
||||
BeginUpdate;
|
||||
OldSorted:=Sorted;
|
||||
CmpList:=nil;
|
||||
@ -396,7 +396,7 @@ var
|
||||
ListItem : TGtkTreeIter;
|
||||
begin
|
||||
if (Index < 0) or (Index >= Count) then
|
||||
RaiseException('TGtkListStoreStringList.Get Out of bounds.')
|
||||
RaiseGDBException('TGtkListStoreStringList.Get Out of bounds.')
|
||||
else begin
|
||||
UpdateItemCache;
|
||||
ListItem:=FCachedItems[Index];
|
||||
@ -419,7 +419,7 @@ var
|
||||
begin
|
||||
Result:=nil;
|
||||
if (Index < 0) or (Index >= Count) then
|
||||
RaiseException('TGtkListStoreStringList.GetObject Out of bounds.')
|
||||
RaiseGDBException('TGtkListStoreStringList.GetObject Out of bounds.')
|
||||
else if FGtkListStore<>nil then begin
|
||||
UpdateItemCache;
|
||||
ListItem:=FCachedItems[Index];
|
||||
@ -432,7 +432,7 @@ var
|
||||
ListItem : TGtkTreeIter;
|
||||
begin
|
||||
if (Index < 0) or (Index >= Count) then
|
||||
RaiseException('TGtkListStoreStringList.Put Out of bounds.')
|
||||
RaiseGDBException('TGtkListStoreStringList.Put Out of bounds.')
|
||||
else if FGtkListStore<>nil then begin
|
||||
UpdateItemCache;
|
||||
ListItem:=FCachedItems[Index];
|
||||
@ -544,9 +544,9 @@ begin
|
||||
Index:=m;
|
||||
end;
|
||||
if (Index < 0) or (Index > Count) then
|
||||
RaiseException('TGtkListStoreStringList.Insert: Index '+IntToStr(Index)
|
||||
RaiseGDBException('TGtkListStoreStringList.Insert: Index '+IntToStr(Index)
|
||||
+' out of bounds. Count='+IntToStr(Count));
|
||||
if Owner = nil then RaiseException(
|
||||
if Owner = nil then RaiseGDBException(
|
||||
'TGtkListStoreStringList.Insert Unspecified owner');
|
||||
|
||||
gtk_list_store_insert(FGtkListStore, @li, Index);
|
||||
|
@ -76,11 +76,11 @@ constructor TGtk2MemoStrings.Create(TextView: PGtkTextView;
|
||||
TheOwner: TWinControl);
|
||||
begin
|
||||
inherited Create;
|
||||
if TextView = nil then RaiseException(
|
||||
if TextView = nil then RaiseGDBException(
|
||||
'TGtk2MemoStrings.Create Unspecified Text widget');
|
||||
FGtkText:= TextView;
|
||||
FGtkBuf := gtk_text_view_get_buffer(FGtkText);
|
||||
if TheOwner = nil then RaiseException(
|
||||
if TheOwner = nil then RaiseGDBException(
|
||||
'TGtk2MemoStrings.Create Unspecified owner');
|
||||
FOwner:=TheOwner;
|
||||
end;
|
||||
|
@ -571,7 +571,7 @@ begin
|
||||
then Assert(False, Format('Trace: [TGtk2WidgetSet.SetLabel] %s --> label %s', [Sender.ClassName, TControl(Sender).Caption]))
|
||||
else begin
|
||||
Assert(False, Format('Trace:WARNING: [TGtk2WidgetSet.SetLabel] %s --> No Decendant of TWinControl', [Sender.ClassName]));
|
||||
RaiseException('[TGtk2WidgetSet.SetLabel] ERROR: Sender ('+Sender.Classname+')'
|
||||
RaiseGDBException('[TGtk2WidgetSet.SetLabel] ERROR: Sender ('+Sender.Classname+')'
|
||||
+' is not TWinControl ');
|
||||
end;
|
||||
|
||||
@ -667,7 +667,7 @@ begin
|
||||
then
|
||||
Assert(False, Format('Trace: [TGtk2WidgetSet.SetProperties] %s', [Sender.ClassName]))
|
||||
else
|
||||
RaiseException('TGtk2WidgetSet.SetProperties: '
|
||||
RaiseGDBException('TGtk2WidgetSet.SetProperties: '
|
||||
+' Sender.ClassName='+Sender.ClassName);
|
||||
|
||||
wHandle:= Pointer(TWinControl(Sender).Handle);
|
||||
|
Loading…
Reference in New Issue
Block a user