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) {
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);
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; }
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) {
} else if (throwable instanceof NoSuchFileException) { writeVInt(14); writeOptionalString(((NoSuchFileException) throwable).getFile()); writeOptionalString(((NoSuchFileException) throwable).getOtherFile()); writeOptionalString(((NoSuchFileException) throwable).getReason());