mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Revert what was done in c5021721 : I then added a panel to be rendered instead of throwing an Exception. This was done because the exception was displayed in a blank page... But this was caused simply by a missing `use Exception` !!
So now we're back at throwing an exception, so that the standard mechanism for throwing the error page is triggered.
Handling Twig recursion is mandatory, and done in the beginning of the \Combodo\iTop\Application\TwigBase\Twig\TwigHelper::RenderTemplate catch block to avoid adding on each stack level a useless exception.
17 lines
451 B
PHP
17 lines
451 B
PHP
<?php
|
|
/*
|
|
* @copyright Copyright (C) 2010-2021 Combodo SARL
|
|
* @license http://opensource.org/licenses/AGPL-3.0
|
|
*/
|
|
|
|
/**
|
|
* @since 3.0.0 N°3522
|
|
*/
|
|
class CoreTemplateException extends CoreException
|
|
{
|
|
public function __construct(Exception $oTwigException, string $sTemplatePath)
|
|
{
|
|
$sMessage = "Twig Exception when rendering '$sTemplatePath' : ".$oTwigException->getMessage();
|
|
parent::__construct($sMessage, null, '', $oTwigException);
|
|
}
|
|
} |