diff options
Diffstat (limited to 'src/fltk-images-rgb-pnm.adb')
-rw-r--r-- | src/fltk-images-rgb-pnm.adb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/fltk-images-rgb-pnm.adb b/src/fltk-images-rgb-pnm.adb index dd6ae26..5368b3e 100644 --- a/src/fltk-images-rgb-pnm.adb +++ b/src/fltk-images-rgb-pnm.adb @@ -47,6 +47,16 @@ package body FLTK.Images.RGB.PNM is return This : PNM_Image do This.Void_Ptr := new_fl_pnm_image (Interfaces.C.To_C (Filename)); + case fl_image_fail (This.Void_Ptr) is + when 1 => + raise No_Image_Error; + when 2 => + raise File_Access_Error; + when 3 => + raise Format_Error; + when others => + null; + end case; end return; end Create; |