Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void handleError(Throwable e) {
- String errorMessage;
- Log.w(TAG, e);
- try {
- throw e;
- } catch (JetTaxiException je) {
- errorMessage = e.getLocalizedMessage();
- if (je.getStatusCode() == HttpStatus.SC_UNAUTHORIZED) {
- logout();
- }
- } catch (IOException io) {
- errorMessage = getString(R.string.network_error);
- } catch (Throwable throwable) {
- errorMessage = getString(R.string.unknown_error);
- BugSenseHandler.log(TAG, (Exception) throwable);
- }
- if (isActive()) {
- Toast.makeText(this, errorMessage, Toast.LENGTH_LONG).show();
- }
- }
Add Comment
Please, Sign In to add comment