GX-Task #68123 » refs_#68123__catch_and_log_smarty_exceptions_in_content_views.patch
| src/GXMainComponents/View/ThemeContentViews/core/ThemeContentView.inc.php (revision 08edc00f4fcefa2122953785ea17302bc62d8f5c) → src/GXMainComponents/View/ThemeContentViews/core/ThemeContentView.inc.php (date 1609840445892) | ||
|---|---|---|
| 1 | 1 |
<?php |
| 2 | 2 |
/*-------------------------------------------------------------------------------------------------- |
| 3 |
ThemeContentView.inc.php 2020-06-23
|
|
| 3 |
ThemeContentView.inc.php 2021-01-05
|
|
| 4 | 4 |
Gambio GmbH |
| 5 | 5 |
http://www.gambio.de |
| 6 |
Copyright (c) 2020 Gambio GmbH
|
|
| 6 |
Copyright (c) 2021 Gambio GmbH
|
|
| 7 | 7 |
Released under the GNU General Public License (Version 2) |
| 8 | 8 |
[http://www.gnu.org/licenses/gpl-2.0.html] |
| 9 | 9 |
-------------------------------------------------------------------------------------------------- |
| 10 | 10 |
*/ |
| 11 | 11 | |
| 12 |
use function Gambio\Core\Logging\logger; |
|
| 13 | ||
| 12 | 14 |
class ThemeContentView extends BaseClass implements ContentViewInterface |
| 13 | 15 |
{
|
| 14 | 16 |
var $v_env_get_array = []; |
| ... | ... | |
| 439 | 441 |
|
| 440 | 442 |
$fetchTemplatePath .= implode('|', $extenderTemplateFiles);
|
| 441 | 443 |
} |
| 442 |
$t_html_output = $this->v_coo_smarty->fetch($fetchTemplatePath, $this->get_cache_id()); |
|
| 444 |
try {
|
|
| 445 |
$t_html_output = $this->v_coo_smarty->fetch($fetchTemplatePath, $this->get_cache_id()); |
|
| 446 |
}catch (SmartyCompilerException $exception){
|
|
| 447 |
logger('smarty')->error($exception->getMessage(), [
|
|
| 448 |
'template path' => $fetchTemplatePath, |
|
| 449 |
'exception' => $exception, |
|
| 450 |
]); |
|
| 451 |
throw new Exception('Could not render content view.');
|
|
| 452 |
} |
|
| 443 | 453 |
|
| 444 | 454 |
# insert session_ids |
| 445 | 455 |
$t_html_output = $this->replace_session_id_placeholder($t_html_output); |