Error created when a file is missing or not found
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(error_t), | intent(out), | allocatable | :: | error |
Instance of the error data |
|
character(len=*), | intent(in) | :: | file_name |
Name of the missing file |
subroutine file_not_found_error(error, file_name)
!> Instance of the error data
type(error_t), allocatable, intent(out) :: error
!> Name of the missing file
character(len=*), intent(in) :: file_name
allocate(error)
error%message = "'"//file_name//"' could not be found, check if the file exists"
end subroutine file_not_found_error