for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Anomaly\Streams\Platform\Exception\Displayer;
use Illuminate\Http\Response;
/**
* Class ViewDisplayer
*
* @link http://pyrocms.com/
* @author PyroCMS, Inc. <[email protected]>
* @author Ryan Thompson <[email protected]>
*/
class ViewDisplayer extends \GrahamCampbell\Exceptions\Displayers\ViewDisplayer
{
* Get the error response associated with the given exception.
* @param \Exception $exception
* @param string $id
* @param int $code
* @param string[] $headers
* @return \Symfony\Component\HttpFoundation\Response
public function display(\Exception $exception, $id, $code, array $headers)
$info = $this->info->generate($exception, $id, $code);
return new Response(
$this->factory->make("streams::errors/{$code}", $info),
$code,
array_merge($headers, ['Content-Type' => $this->contentType()])
);
}
* Can we display the exception?
* @param \Exception $original
* @param \Exception $transformed
* @return bool
public function canDisplay(\Exception $original, \Exception $transformed, $code)
return $this->factory->exists("streams::errors/{$code}");