diff options
author | Jedidiah Barber <contact@jedbarber.id.au> | 2025-01-29 13:38:11 +1300 |
---|---|---|
committer | Jedidiah Barber <contact@jedbarber.id.au> | 2025-01-29 13:38:11 +1300 |
commit | 82ec0d8c8d1ba164aa2d29c8f1203730aa51988c (patch) | |
tree | 5a97b24d2c1325a2563a4cff70f285fd6da34b44 /body/fltk-widgets-groups.adb | |
parent | dee76d5884c6f079ea3a2387d07289534a51a0c1 (diff) |
Raises of Internal_FLTK_Error now come with error messages
Diffstat (limited to 'body/fltk-widgets-groups.adb')
-rw-r--r-- | body/fltk-widgets-groups.adb | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/body/fltk-widgets-groups.adb b/body/fltk-widgets-groups.adb index 3b2e287..281d273 100644 --- a/body/fltk-widgets-groups.adb +++ b/body/fltk-widgets-groups.adb @@ -374,7 +374,8 @@ package body FLTK.Widgets.Groups is Actual_Widget := Widget_Convert.To_Pointer (Storage.To_Address (Widget_Ptr)); return (Data => Actual_Widget); exception - when Chk.Assertion_Error => raise Internal_FLTK_Error; + when Chk.Assertion_Error => raise Internal_FLTK_Error with + "Fl_Group::child returned Widget with no user_data reference back to Ada"; end Child; @@ -471,11 +472,15 @@ package body FLTK.Widgets.Groups is function Get_Clip_Mode (This : in Group) - return Clip_Mode is + return Clip_Mode + is + Result : Interfaces.C.unsigned := fl_group_get_clip_children (This.Void_Ptr); begin - return Clip_Mode'Val (fl_group_get_clip_children (This.Void_Ptr)); + return Clip_Mode'Val (Result); exception - when Constraint_Error => raise Internal_FLTK_Error; + when Constraint_Error => raise Internal_FLTK_Error with + "Fl_Group::clip_children returned unexpected unsigned int value of " & + Interfaces.C.unsigned'Image (Result); end Get_Clip_Mode; @@ -511,7 +516,8 @@ package body FLTK.Widgets.Groups is end if; return Actual_Widget; exception - when Chk.Assertion_Error => raise Internal_FLTK_Error; + when Chk.Assertion_Error => raise Internal_FLTK_Error with + "Fl_Group::resizable returned Widget with no user_data reference back to Ada"; end Get_Resizable; @@ -558,7 +564,8 @@ package body FLTK.Widgets.Groups is end if; return Actual_Group; exception - when Chk.Assertion_Error => raise Internal_FLTK_Error; + when Chk.Assertion_Error => raise Internal_FLTK_Error with + "Fl_Group::current returned Widget with no user_data reference back to Ada"; end Get_Current; |