Handle RuntimeException thrown in SAMLParser.parse()

Signed-off-by: PavlNekrasov <95914807+PavlNekrasov@users.noreply.github.com>
This commit is contained in:
PavlNekrasov
2025-12-02 15:18:12 +03:00
committed by Marek Posolda
parent 8def691053
commit 1d16429530

View File

@@ -118,13 +118,18 @@ public class SAMLParser extends AbstractParser {
throw logger.parserException(new RuntimeException(ErrorCodes.UNKNOWN_START_ELEMENT + name + "::location="
+ startElement.getLocation()));
}
try {
return pf.create().parse(xmlEventReader);
} catch (RuntimeException e) {
throw logger.parserException(e);
}
return pf.create().parse(xmlEventReader);
}
StaxParserUtil.getNextEvent(xmlEventReader);
}
throw new RuntimeException(ErrorCodes.FAILED_PARSING + "SAML Parsing has failed");
throw logger.parserException(
new RuntimeException(ErrorCodes.FAILED_PARSING + "SAML Parsing has failed"));
}
}
}