Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public String getTest(int i, int current, int total)
- {
- String text = "";
- try
- {
- if (i == 1)
- throw new IOException();
- else if (i == 2)
- throw new SSLException("SSLEx");
- else if (i == 3)
- throw new SocketException();
- else
- text = "EVERYTHING GOOD";
- }
- catch (SSLException | SocketException re)
- {
- if (current < total)
- {
- System.out.println("Recalling " + current);
- text = getTest(1, ++current, total);
- }
- }
- catch (IOException ioe)
- {
- text = "HTTP ERROR";
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- return text;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement