file_not_found_error Subroutine

public subroutine file_not_found_error(error, file_name)

Error created when a file is missing or not found

Arguments

Type IntentOptional 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


Source Code

    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