Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (e instanceof RuntimeException && e.getLocalizedMessage() != null &&
- !e.getLocalizedMessage().isEmpty() && e.getLocalizedMessage().length() <= 3) {
- int code = Integer.parseInt(e.getLocalizedMessage());
- if (code == ResponseStatus.SC_FORBIDDEN) {
- view.onForbidden();
- } else {
- handleError(); // Abstract method to be implemented on child class
- view.showErrorPhoneNumber(ErrorHandler.getErrorMessage(e)); // Put this on handleError() on child class
- }
- } else {
- handleError(); // Abstract method to be implemented on child class
- view.showErrorPhoneNumber(ErrorHandler.getErrorMessage(e)); // Put this on handleError() on child class
- }
Add Comment
Please, Sign In to add comment