Source of file Exception.php
Size: 0,962 Bytes - Last Modified: 2017-11-08T13:54:24+00:00
/home/travis/build/bluzphp/framework/src/View/Helper/Exception.php
123456789101112131415161718192021222324252627282930313233343536373839 | <?php /** * Bluz Framework Component * * @copyright Bluz PHP Team * @link https://github.com/bluzphp/framework */ declare(strict_types=1); namespace Bluz\View\Helper; use Bluz\Application\Application; /** * Return Exception message * * @param \Exception $exception * * @return string */ return function ($exception) { if ($exception && Application::getInstance()->isDebug()) { // @codeCoverageIgnoreStart // exception message for developers return '<div class="alert alert-warning">' . '<strong>Exception</strong>' . '<p>' . esc($exception->getMessage()) . '</p>' . '<code>' . $exception->getFile() . ':' . $exception->getLine() .'</code>' . '</div>' . '<pre>' . $exception->getTraceAsString() . '</pre>' ; // @codeCoverageIgnoreEnd } return ''; }; |