@Test public void close() throws IOException { Closeable closeableMock = Mockito.mock(Closeable.class); Mockito.doThrow(Mockito.mock(IOException.class)).when(closeableMock).close(); ResolutionError.closeQuietly(closeableMock); }
static void closeQuietly(Closeable... closeables) { for (Closeable closeable : closeables) { try { closeable.close(); } catch (IOException e) { LOGGER.error("Error while closing writer after printing StackTrace", e); } } }
ResolutionError { static void closeQuietly(Closeable... closeables) { for (Closeable closeable : closeables) { try { closeable.close(); } catch (IOException e) { LOGGER.error("Error while closing writer after printing StackTrace", e); } } } }
ResolutionError { static void closeQuietly(Closeable... closeables) { for (Closeable closeable : closeables) { try { closeable.close(); } catch (IOException e) { LOGGER.error("Error while closing writer after printing StackTrace", e); } } } ResolutionError(URI snitchUri, String message, Throwable cause); }
ResolutionError { static void closeQuietly(Closeable... closeables) { for (Closeable closeable : closeables) { try { closeable.close(); } catch (IOException e) { LOGGER.error("Error while closing writer after printing StackTrace", e); } } } ResolutionError(URI snitchUri, String message, Throwable cause); static ResolutionError translate(SnitchingException e); static ResolutionError of(URI snitchUri, String message, Throwable cause); static ResolutionError of(URI snitchUri, String message); @Override int hashCode(); @Override boolean equals(Object obj); String getMessage(); URI getSnitchUri(); boolean hasCause(); @JsonIgnore Optional<Throwable> getCause(); Optional<String> getCauseStackTraceString(); }
ResolutionError { static void closeQuietly(Closeable... closeables) { for (Closeable closeable : closeables) { try { closeable.close(); } catch (IOException e) { LOGGER.error("Error while closing writer after printing StackTrace", e); } } } ResolutionError(URI snitchUri, String message, Throwable cause); static ResolutionError translate(SnitchingException e); static ResolutionError of(URI snitchUri, String message, Throwable cause); static ResolutionError of(URI snitchUri, String message); @Override int hashCode(); @Override boolean equals(Object obj); String getMessage(); URI getSnitchUri(); boolean hasCause(); @JsonIgnore Optional<Throwable> getCause(); Optional<String> getCauseStackTraceString();  }