public function create(array $args = [], $class = '')
{
try {
$object = $this->factory->create($args, (string) $class);
} catch (Exception $e) {
if (defined('WP_DEBUG') && WP_DEBUG) {
throw $e;
}
return $this->factory->create($args, ErrorFactory::DEFAULT_CLASS);
}
return $object;
}