protected function resolveRenderingGroup($exception)
{
if (!isset($this->options['renderingGroups'])) {
return null;
}
foreach ($this->options['renderingGroups'] as $renderingGroupName => $renderingGroupSettings) {
if (isset($renderingGroupSettings['matchingExceptionClassNames'])) {
foreach ($renderingGroupSettings['matchingExceptionClassNames'] as $exceptionClassName) {
if ($exception instanceof $exceptionClassName) {
return $renderingGroupName;
}
}
}
if (isset($renderingGroupSettings['matchingStatusCodes']) && $exception instanceof FlowException) {
if (in_array($exception->getStatusCode(), $renderingGroupSettings['matchingStatusCodes'])) {
return $renderingGroupName;
}
}
}
}