summaryrefslogtreecommitdiff
path: root/src/fltk-environment.adb
diff options
context:
space:
mode:
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;