for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Spiral Framework.
*
* @license MIT
* @author Anton Titov (Wolfy-J)
*/
namespace Spiral\Views\Exceptions;
* Exception while rendering.
class RenderException extends ViewsException
{
* {@inheritdoc}
public function __construct(\Exception $previous = null)
parent::__construct($previous->getMessage(), $previous->getCode(), $previous);
$previous
null
If a variable is not always an object, we recommend to add an additional type check to ensure your method call is safe:
function someFunction(A $objectMaybe = null) { if ($objectMaybe instanceof A) { $objectMaybe->doSomething(); } }
$this->file = $previous->file;
$this->line = $previous->line;
}
If a variable is not always an object, we recommend to add an additional type check to ensure your method call is safe: