mirror of
https://github.com/keycloak/keycloak.git
synced 2025-12-16 12:05:49 -06:00
Handle RuntimeException thrown in SAMLParser.parse()
Signed-off-by: PavlNekrasov <95914807+PavlNekrasov@users.noreply.github.com>
This commit is contained in:
committed by
Marek Posolda
parent
8def691053
commit
1d16429530
@@ -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"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user