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-file_choosers.adb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'body/fltk-file_choosers.adb') diff --git a/body/fltk-file_choosers.adb b/body/fltk-file_choosers.adb index 5662f8a..9345eee 100644 --- a/body/fltk-file_choosers.adb +++ b/body/fltk-file_choosers.adb @@ -967,7 +967,8 @@ package body FLTK.File_Choosers is end if; return Ada_Obj; exception - when Chk.Assertion_Error => raise Internal_FLTK_Error; + when Chk.Assertion_Error => raise Internal_FLTK_Error with + "Fl_File_Chooser::add_extra returned Widget with no user_data reference back to Ada"; end Eject_Extra; @@ -1058,7 +1059,9 @@ package body FLTK.File_Choosers is pragma Assert (Ret in 0 .. 1); return Boolean'Val (Ret); exception - when Chk.Assertion_Error => raise Internal_FLTK_Error; + when Chk.Assertion_Error => raise Internal_FLTK_Error with + "Fl_File_Chooser::preview returned unexpected int value of " & + Interfaces.C.int'Image (Ret); end Has_Preview; -- cgit