MCPcopy Create free account
hub / github.com/M66B/FairEmail / error

Method error

app/src/main/java/eu/faircode/email/Core.java:5864–5898  ·  view source on GitHub ↗
(Throwable ex)

Source from the content-addressed store, hash-verified

5862 }
5863
5864 void error(Throwable ex) {
5865 if (ex instanceof MessagingException &&
5866 ("connection failure".equals(ex.getMessage()) ||
5867 "Not connected".equals(ex.getMessage()) || // POP3
5868 ex.getCause() instanceof SocketException ||
5869 ex.getCause() instanceof ConnectionException))
5870 recoverable = false;
5871
5872 if (ex instanceof ConnectionException)
5873 // failed to create new store connection
5874 // BYE, Socket is closed
5875 recoverable = false;
5876
5877 if (ex instanceof StoreClosedException ||
5878 ex instanceof FolderClosedException ||
5879 ex instanceof FolderNotFoundException)
5880 // Lost folder connection to server
5881 recoverable = false;
5882
5883 if (ex instanceof IllegalStateException && (
5884 "Not connected".equals(ex.getMessage()) ||
5885 "This operation is not allowed on a closed folder".equals(ex.getMessage())))
5886 recoverable = false;
5887
5888 if (ex instanceof OperationCanceledException)
5889 recoverable = false;
5890
5891 if (!recoverable)
5892 unrecoverable = ex;
5893
5894 if (!backingoff) {
5895 thread.interrupt();
5896 microWait();
5897 }
5898 }
5899
5900 void reset() {
5901 Thread.currentThread().interrupted(); // clear interrupted status

Callers 3

processOperationsMethod · 0.45
onDeleteMethod · 0.45
reportEmptyMessageMethod · 0.45

Calls 4

microWaitMethod · 0.95
getMessageMethod · 0.65
equalsMethod · 0.45
getCauseMethod · 0.45

Tested by

no test coverage detected