From 53aa8144851913994b963ed611cca8885b8f9a9e Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Thu, 9 Jan 2025 23:53:32 +1300 Subject: Internal_FLTK_Error raises are now pragma Asserts --- src/fltk-widgets-groups-help_views.adb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/fltk-widgets-groups-help_views.adb') diff --git a/src/fltk-widgets-groups-help_views.adb b/src/fltk-widgets-groups-help_views.adb index 715e2ca..a5b169c 100644 --- a/src/fltk-widgets-groups-help_views.adb +++ b/src/fltk-widgets-groups-help_views.adb @@ -6,6 +6,7 @@ with + Ada.Assertions, Interfaces.C.Strings, System.Address_To_Access_Conversions; @@ -17,6 +18,11 @@ use type package body FLTK.Widgets.Groups.Help_Views is + package Chk renames Ada.Assertions; + + + + ------------------------ -- Functions From C -- ------------------------ @@ -422,9 +428,11 @@ package body FLTK.Widgets.Groups.Help_Views is begin if Code = -1 then raise Load_Help_Error; - elsif Code /= 0 then - raise Internal_FLTK_Error; + else + pragma Assert (Code = 0); end if; + exception + when Chk.Assertion_Error => raise Internal_FLTK_Error; end Load; -- cgit