} catch (IOException ex) {
throw ex;
} catch (Exception ex) {
// Try to extract a BeangleSecurityException from the stacktrace
Throwable[] causeChain = this.throwableAnalyzer.determineCauseChain(ex);
BeangleSecurityException ase = (BeangleSecurityException) this.throwableAnalyzer
.getFirstThrowableOfType(BeangleSecurityException.class, causeChain);
if (ase != null) {
handleException(request, response, chain, ase);
} else {