Please find below an example of my need. Indeed, I don't want to close the entire process because even if it throw an Exception, it can continue.
Loop
// set a lot of variables and execute some methods
for (int i = 0, i < items.length; i++) {
// blablabla
myMethod()
// blablabla2
}
// some code here also
MyMethod()
// blabla
if (!found)
throw new EndCurrentProcessException()
// blabla
EndCurrentProcessException
public void EndCurrentProcessException() {
??? What I'm supposed to put here to stop the loop iteration ???
}
Maybe that used throw new
is not the good way to do.
I hope it is clear, if it is not, do not hesitate to ask me more informations.