From 82ec0d8c8d1ba164aa2d29c8f1203730aa51988c Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Wed, 29 Jan 2025 13:38:11 +1300 Subject: Raises of Internal_FLTK_Error now come with error messages --- body/fltk-widgets-groups-color_choosers.adb | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'body/fltk-widgets-groups-color_choosers.adb') diff --git a/body/fltk-widgets-groups-color_choosers.adb b/body/fltk-widgets-groups-color_choosers.adb index 15f34ed..fdb2f04 100644 --- a/body/fltk-widgets-groups-color_choosers.adb +++ b/body/fltk-widgets-groups-color_choosers.adb @@ -262,7 +262,9 @@ package body FLTK.Widgets.Groups.Color_Choosers is begin pragma Assert (Result in 0 .. 1); exception - when Chk.Assertion_Error => raise Internal_FLTK_Error; + when Chk.Assertion_Error => raise Internal_FLTK_Error with + "Fl_Color_Chooser::rgb returned unexpected int value of " & + Interfaces.C.int'Image (Result); end Set_RGB; @@ -279,7 +281,9 @@ package body FLTK.Widgets.Groups.Color_Choosers is begin return Boolean'Val (Result); exception - when Constraint_Error => raise Internal_FLTK_Error; + when Constraint_Error => raise Internal_FLTK_Error with + "Fl_Color_Chooser::rgb returned unexpected int value of " & + Interfaces.C.int'Image (Result); end Set_RGB; @@ -321,7 +325,9 @@ package body FLTK.Widgets.Groups.Color_Choosers is begin pragma Assert (Result in 0 .. 1); exception - when Chk.Assertion_Error => raise Internal_FLTK_Error; + when Chk.Assertion_Error => raise Internal_FLTK_Error with + "Fl_Color_Chooser:hsv returned unexpected int value of " & + Interfaces.C.int'Image (Result); end Set_HSV; @@ -338,7 +344,9 @@ package body FLTK.Widgets.Groups.Color_Choosers is begin return Boolean'Val (Result); exception - when Constraint_Error => raise Internal_FLTK_Error; + when Constraint_Error => raise Internal_FLTK_Error with + "Fl_Color_Chooser::hsv returned unexpected int value of " & + Interfaces.C.int'Image (Result); end Set_HSV; -- cgit