Source:
<code>public Element build(final CallbackProperties properties) throws SAMLAssertionBuilderException { LOG.debug("SamlCallbackHandler.createHOKSAMLAssertion20()"); Element signedAssertion = null; try { Assertion assertion; assertion = OpenSAML2ComponentBuilder.getInstance().createAssertion(); final String aID = createAssertionId(); LOG.debug("Assertion ID: {}", aID); assertion.setID(aID); final DateTime issueInstant = new DateTime(); assertion.setIssueInstant(issueInstant); assertion.setIssuer(createIssuer(properties)); final X509Certificate certificate = certificateManager.getDefaultCertificate(); final PublicKey publicKey = certificateManager.getDefaultPublicKey(); final Subject subject = createSubject(properties, certificate, publicKey); assertion.setSubject(subject); final Subject evidenceSubject = createEvidenceSubject(properties, certificate, publicKey); assertion.getStatements().addAll(createAttributeStatements(properties, evidenceSubject)); final PrivateKey privateKey = certificateManager.getDefaultPrivateKey(); signedAssertion = sign(assertion, certificate, privateKey, publicKey); } catch (final SAMLAssertionBuilderException ex) { LOG.error("Unable to create HOK Assertion: {}", ex.getLocalizedMessage()); throw ex; <START> } catch (final Exception ex) { <END> LOG.error("Unable to create HOK Assertion: {}", ex.getLocalizedMessage()); } LOG.debug("SamlCallbackHandler.createHOKSAMLAssertion20() -- End"); return signedAssertion; }</code><technical_language>suppress this generic exception throw SAMLAssertionBuilderException above? remove generic exception here</technical_language>

Target:
public Element build(final CallbackProperties properties) throws SAMLAssertionBuilderException { LOG.debug("SamlCallbackHandler.createHOKSAMLAssertion20()"); Element signedAssertion = null; try { Assertion assertion; assertion = OpenSAML2ComponentBuilder.getInstance().createAssertion(); final String aID = createAssertionId(); LOG.debug("Assertion ID: {}", aID); assertion.setID(aID); final DateTime issueInstant = new DateTime(); assertion.setIssueInstant(issueInstant); assertion.setIssuer(createIssuer(properties)); final X509Certificate certificate = certificateManager.getDefaultCertificate(); final PublicKey publicKey = certificateManager.getDefaultPublicKey(); final Subject subject = createSubject(properties, certificate, publicKey); assertion.setSubject(subject); final Subject evidenceSubject = createEvidenceSubject(properties, certificate, publicKey); assertion.getStatements().addAll(createAttributeStatements(properties, evidenceSubject)); final PrivateKey privateKey = certificateManager.getDefaultPrivateKey(); signedAssertion = sign(assertion, certificate, privateKey, publicKey); } catch (final SAMLComponentBuilderException ex) { LOG.error("Unable to create HOK Assertion: {}", ex.getLocalizedMessage()); throw new SAMLAssertionBuilderException(ex.getLocalizedMessage(), ex); } catch (final CertificateManagerException ex) { LOG.error("Unable to create HOK Assertion: {}", ex.getLocalizedMessage()); throw new SAMLAssertionBuilderException(ex.getLocalizedMessage(), ex); } LOG.debug("SamlCallbackHandler.createHOKSAMLAssertion20() -- End"); return signedAssertion; }