공부
[Java] re try catch
승가비
2021. 2. 9. 01:02
728x90
int MAX = 3;
int count = 0;
while (true) {
try {
...
break;
} catch (Exception e) {
if (count++ < MAX) {
continue;
}
...
break;
}
}
https://stackoverflow.com/questions/13239972/how-do-you-implement-a-re-try-catch
How do you implement a re-try-catch?
Try-catch is meant to help in the exception handling. This means somehow that it will help our system to be more robust: try to recover from an unexpected event. We suspect something might happen...
stackoverflow.com
728x90