java.nio.file.NoSuchFileException.getFile()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(204)

本文整理了Java中java.nio.file.NoSuchFileException.getFile()方法的一些代码示例,展示了NoSuchFileException.getFile()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NoSuchFileException.getFile()方法的具体详情如下:
包路径:java.nio.file.NoSuchFileException
类名称:NoSuchFileException
方法名:getFile

NoSuchFileException.getFile介绍

暂无

代码示例

代码示例来源:origin: org.apache.lucene/lucene-core

throw new CorruptIndexException("Problem reading index from " + dir, dir.toString(), e);
} catch (NoSuchFileException e) {
 throw new CorruptIndexException("Problem reading index.", e.getFile(), e);
} finally {
 if (!success) {

代码示例来源:origin: HubSpot/Singularity

Files.delete(uploader.getMetadataPath());
} catch (NoSuchFileException nfe) {
 LOG.warn("File {} was already deleted", nfe.getFile());
} catch (IOException e) {
 LOG.warn("Couldn't delete {}", uploader.getMetadataPath(), e);
 Files.delete(expiredUploader.getMetadataPath());
} catch (NoSuchFileException nfe) {
 LOG.warn("File {} was already deleted", nfe.getFile());
} catch (IOException e) {
 LOG.warn("Couldn't delete {}", expiredUploader.getMetadataPath(), e);

代码示例来源:origin: com.sap.cloud.servicesdk.cds.tools/generator-core

public Result generate(CsnSupplier csn, Consumer consumer, Supplier supplier) throws IOException {
  IssueCollectorFactory.clearIssues();
  Result result = new Result();
  try {
    CdsModel cdsModel = CsnParser.parseData(csn.get());
    result.status = generate(cdsModel, consumer, supplier);
  } catch (NoSuchFileException e) {
    String msg = "CSN file not found: ";
    logger.debug(msg, e);
    issueCollector.critical("", msg + e.getFile());
  } catch (Throwable t) { // NOSONAR
    logger.debug("Stopped execution due to exception: ", t);
    issueCollector.critical("", t.getMessage());
  }
  result.issues.addAll(IssueCollectorFactory.getIssues());
  return result;
}

代码示例来源:origin: red6/pdfcompare

compareResult.actualOnly();
} catch (NoSuchFileException innerEx) {
  LOG.warn("No files found to compare. Tried Expected: '{}' and Actual: '{}'", ex.getFile(), innerEx.getFile());
  compareResult.noPagesFound();

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

throw new CorruptIndexException("Problem reading index from " + dir, dir.toString(), e);
} catch (NoSuchFileException e) {
 throw new CorruptIndexException("Problem reading index.", e.getFile(), e);
} finally {
 if (!success) {

代码示例来源:origin: harbby/presto-connectors

} else if (throwable instanceof NoSuchFileException) {
  writeVInt(14);
  writeOptionalString(((NoSuchFileException) throwable).getFile());
  writeOptionalString(((NoSuchFileException) throwable).getOtherFile());
  writeOptionalString(((NoSuchFileException) throwable).getReason());

相关文章