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-environment.adb | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/fltk-environment.adb') diff --git a/src/fltk-environment.adb b/src/fltk-environment.adb index a1ebdbe..22cf676 100644 --- a/src/fltk-environment.adb +++ b/src/fltk-environment.adb @@ -6,6 +6,7 @@ with + Ada.Assertions, Interfaces.C.Strings; use type @@ -17,6 +18,11 @@ use type package body FLTK.Environment is + package Chk renames Ada.Assertions; + + + + ------------------------ -- Constants From C -- ------------------------ @@ -381,11 +387,12 @@ package body FLTK.Environment is begin if Num = root_fl_prefs_system then return Global; - elsif Num = root_fl_prefs_user then - return User; else - raise Internal_FLTK_Error; + pragma Assert (Num = root_fl_prefs_user); + return User; end if; + exception + when Chk.Assertion_Error => raise Internal_FLTK_Error; end To_Scope; -- cgit