mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-11-27 09:46:50 +03:00
Enhance exception catching in NotesClient
This commit is contained in:
parent
3ec96e29d0
commit
6c4b941a09
1 changed files with 3 additions and 7 deletions
|
@ -215,14 +215,10 @@ public class NotesClient {
|
|||
Log.d(TAG, "ETag: " + etag + "; Last-Modified: " + lastModified + " (" + lastModified + ")");
|
||||
// return these header fields since they should only be saved after successful processing the result!
|
||||
return new ResponseData(result.toString(), etag, lastModified);
|
||||
} catch(NextcloudApiNotRespondingException | NextcloudHttpRequestFailedException e) {
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
if(e instanceof NextcloudHttpRequestFailedException) {
|
||||
throw (NextcloudHttpRequestFailedException) e;
|
||||
} else if(e instanceof NextcloudApiNotRespondingException) {
|
||||
throw (NextcloudApiNotRespondingException) e;
|
||||
} else {
|
||||
e.printStackTrace();
|
||||
}
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue