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-devices-surface-paged.adb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'body/fltk-devices-surface-paged.adb') diff --git a/body/fltk-devices-surface-paged.adb b/body/fltk-devices-surface-paged.adb index 829974a..e13338f 100644 --- a/body/fltk-devices-surface-paged.adb +++ b/body/fltk-devices-surface-paged.adb @@ -211,7 +211,7 @@ package body FLTK.Devices.Surface.Paged is return Media; end if; exception - when Chk.Assertion_Error => raise Internal_FLTK_Error; + when Chk.Assertion_Error => raise Constraint_Error; end To_Page_Format; @@ -243,7 +243,7 @@ package body FLTK.Devices.Surface.Paged is return Orientation; end if; exception - when Chk.Assertion_Error => raise Internal_FLTK_Error; + when Chk.Assertion_Error => raise Constraint_Error; end To_Page_Layout; @@ -267,6 +267,10 @@ package body FLTK.Devices.Surface.Paged is Data (Index).My_Height := Natural (C_Height); end loop; end return; + exception + when Constraint_Error => raise Internal_FLTK_Error with + "Fl_Paged_Device::NO_PAGE_FORMATS has inconsistent value of " & + Interfaces.C.int'Image (fl_no_page_formats); end Get_Page_Formats; -- cgit