Code example for FileNotFoundException

0
      LOG.info("recoverLease=" + recovered + ", " +
        getLogMessageDetail(nbAttempt, p, startWaiting));
    } catch (IOException e) {
      if (e instanceof LeaseExpiredException && e.getMessage().contains("File does not exist")) {
        // This exception comes out instead of FNFE, fix it 
        throw new FileNotFoundException("The given WAL wasn't found at " + p);
      } else if (e instanceof FileNotFoundException) {
        throw (FileNotFoundException)e;
      } 
      LOG.warn(getLogMessageDetail(nbAttempt, p, startWaiting), e);
    } 
    return recovered;
  } 
 
  /** 
   * @param nbAttempt 
   * @param p 
   * @param startWaiting 
   * @return Detail to append to any log message around lease recovering. 
   */