redefine ResourceNotFounsException into Template namespace
This commit is contained in:
@@ -28,7 +28,7 @@ use Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
|
||||
use Thelia\Core\Template\Exception\ResourceNotFoundException;
|
||||
use Thelia\Core\Template\ParserInterface;
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* This program is free software; you can redistribute it and/or modify */
|
||||
/* it under the terms of the GNU General Public License as published by */
|
||||
/* the Free Software Foundation; either version 3 of the License */
|
||||
/* */
|
||||
/* This program is distributed in the hope that it will be useful, */
|
||||
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||
/* GNU General Public License for more details. */
|
||||
/* */
|
||||
/* You should have received a copy of the GNU General Public License */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
namespace Thelia\Core\Template\Exception;
|
||||
|
||||
|
||||
class ResourceNotFoundException extends \RuntimeException {
|
||||
|
||||
}
|
||||
@@ -12,6 +12,7 @@ use Thelia\Core\Template\Loop\Category;
|
||||
|
||||
use Thelia\Core\Template\Smarty\SmartyPluginInterface;
|
||||
use Thelia\Core\Template\Smarty\Assets\SmartyAssetsManager;
|
||||
use Thelia\Core\Template\Exception\ResourceNotFoundException;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -168,6 +169,6 @@ class SmartyParser extends Smarty implements ParserInterface {
|
||||
|
||||
if (file_exists($fileName)) return $fileName;
|
||||
|
||||
throw new \RuntimeException(sprintf("%s file not found in %s template", $file, $this->template));
|
||||
throw new ResourceNotFoundException(sprintf("%s file not found in %s template", $file, $this->template));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user