[JENKINS-14575] Retry on other exceptions as well

The current logic did not support the GitException, so the retry did not work. With this patch, it is going to catch the other exceptions generated from the different SCM plugins so the retry will work with them as well.