src/gray_params.f90: handle file not found error

This commit is contained in:
Michele Guerini Rocco 2021-12-15 02:30:53 +01:00
parent 023facac6b
commit 1648a7878a
Signed by: rnhmjoj
GPG Key ID: BFBAF4C975F76450

View File

@ -166,7 +166,7 @@ contains
integer, intent(in), optional :: unit
! local variables
integer :: u
integer :: u, iostat
if (present(unit)) then
u=unit
@ -174,6 +174,10 @@ contains
u = get_free_unit()
end if
open(u,file=filenm,status='old',action='read',iostat=iostat)
if (iostat>0) then
print'(a)', 'gray_params file not found!'
call EXIT(1)
end if
! Raytracing
! ========================================================================