summaryrefslogtreecommitdiff
path: root/body/fltk-draw.adb
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2025-01-29 13:38:11 +1300
committerJedidiah Barber <contact@jedbarber.id.au>2025-01-29 13:38:11 +1300
commit82ec0d8c8d1ba164aa2d29c8f1203730aa51988c (patch)
tree5a97b24d2c1325a2563a4cff70f285fd6da34b44 /body/fltk-draw.adb
parentdee76d5884c6f079ea3a2387d07289534a51a0c1 (diff)
Raises of Internal_FLTK_Error now come with error messages
Diffstat (limited to 'body/fltk-draw.adb')
-rw-r--r--body/fltk-draw.adb16
1 files changed, 12 insertions, 4 deletions
diff --git a/body/fltk-draw.adb b/body/fltk-draw.adb
index 8e98a7f..a98edae 100644
--- a/body/fltk-draw.adb
+++ b/body/fltk-draw.adb
@@ -685,7 +685,9 @@ package body FLTK.Draw is
return False;
end if;
exception
- when Chk.Assertion_Error => raise Internal_FLTK_Error;
+ when Chk.Assertion_Error => raise Internal_FLTK_Error with
+ "fl_can_do_alpha_blending returned unexpected value of " &
+ Interfaces.C.int'Image (Result);
end Can_Do_Alpha_Blending;
@@ -1228,7 +1230,9 @@ package body FLTK.Draw is
pragma Assert (Buffer = Storage.To_Integer (Result (Result'First)'Address));
return Result;
exception
- when Chk.Assertion_Error => raise Internal_FLTK_Error;
+ when Chk.Assertion_Error => raise Internal_FLTK_Error with
+ "fl_read_image returned unexpected address value that did not " &
+ "correspond to supplied address value";
end Read_Image;
@@ -1254,7 +1258,9 @@ package body FLTK.Draw is
pragma Assert (Ret_Val = 1);
end if;
exception
- when Chk.Assertion_Error => raise Internal_FLTK_Error;
+ when Chk.Assertion_Error => raise Internal_FLTK_Error with
+ "fl_add_symbol returned unexpected int value of " &
+ Interfaces.C.int'Image (Ret_Val);
end Add_Symbol;
procedure Draw_Text
@@ -1423,7 +1429,9 @@ package body FLTK.Draw is
pragma Assert (Ret_Val = 1);
end if;
exception
- when Chk.Assertion_Error => raise Internal_FLTK_Error;
+ when Chk.Assertion_Error => raise Internal_FLTK_Error with
+ "fl_draw_symbol returned unexpected int value of " &
+ Interfaces.C.int'Image (Ret_Val);
end Draw_Symbol;