summaryrefslogtreecommitdiff
path: root/src/fltk-widgets-groups-browsers-textline-file.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-widgets-groups-browsers-textline-file.adb
parent17473af7e8ed13e0a9399a69442f9839e5d83aef (diff)
Internal_FLTK_Error raises are now pragma Asserts
Diffstat (limited to 'src/fltk-widgets-groups-browsers-textline-file.adb')
-rw-r--r--src/fltk-widgets-groups-browsers-textline-file.adb12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/fltk-widgets-groups-browsers-textline-file.adb b/src/fltk-widgets-groups-browsers-textline-file.adb
index c48e0be..bd7ce7f 100644
--- a/src/fltk-widgets-groups-browsers-textline-file.adb
+++ b/src/fltk-widgets-groups-browsers-textline-file.adb
@@ -6,6 +6,7 @@
with
+ Ada.Assertions,
Interfaces.C.Strings;
use type
@@ -17,6 +18,11 @@ use type
package body FLTK.Widgets.Groups.Browsers.Textline.File is
+ package Chk renames Ada.Assertions;
+
+
+
+
------------------------
-- Functions From C --
------------------------
@@ -385,10 +391,10 @@ package body FLTK.Widgets.Groups.Browsers.Textline.File is
is
Code : Interfaces.C.int := fl_file_browser_get_filetype (This.Void_Ptr);
begin
- if Code not in File_Kind'Pos (File_Kind'First) .. File_Kind'Pos (File_Kind'Last) then
- raise Internal_FLTK_Error;
- end if;
+ pragma Assert (Code in File_Kind'Pos (File_Kind'First) .. File_Kind'Pos (File_Kind'Last));
return File_Kind'Val (Code);
+ exception
+ when Chk.Assertion_Error => raise Internal_FLTK_Error;
end Get_File_Kind;