src/gray_params.f90: handle file not found error
This commit is contained in:
parent
023facac6b
commit
1648a7878a
@ -166,7 +166,7 @@ contains
|
|||||||
integer, intent(in), optional :: unit
|
integer, intent(in), optional :: unit
|
||||||
|
|
||||||
! local variables
|
! local variables
|
||||||
integer :: u
|
integer :: u, iostat
|
||||||
|
|
||||||
if (present(unit)) then
|
if (present(unit)) then
|
||||||
u=unit
|
u=unit
|
||||||
@ -174,6 +174,10 @@ contains
|
|||||||
u = get_free_unit()
|
u = get_free_unit()
|
||||||
end if
|
end if
|
||||||
open(u,file=filenm,status='old',action='read',iostat=iostat)
|
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
|
! Raytracing
|
||||||
! ========================================================================
|
! ========================================================================
|
||||||
|
Loading…
Reference in New Issue
Block a user