summaryrefslogtreecommitdiff
path: root/src/fltk-environment.adb
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2025-01-09 23:53:32 +1300
committerJedidiah Barber <contact@jedbarber.id.au>2025-01-09 23:53:32 +1300
commit53aa8144851913994b963ed611cca8885b8f9a9e (patch)
tree1b2a262cedb353b4aff00e14b200918ac17b11ab /src/fltk-environment.adb
parent17473af7e8ed13e0a9399a69442f9839e5d83aef (diff)
Internal_FLTK_Error raises are now pragma Asserts
Diffstat (limited to 'src/fltk-environment.adb')
-rw-r--r--src/fltk-environment.adb13
1 files changed, 10 insertions, 3 deletions
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;