You are here

function Smarty::_trigger_fatal_error in Quiz 6.6

Same name and namespace in other branches
  1. 6.5 includes/moodle/lib/smarty/Smarty.class.php \Smarty::_trigger_fatal_error()

trigger Smarty plugin error

Parameters

string $error_msg:

string $tpl_file:

integer $tpl_line:

string $file:

integer $line:

integer $error_type:

5 calls to Smarty::_trigger_fatal_error()
Smarty::get_registered_object in includes/moodle/lib/smarty/Smarty.class.php
return a reference to a registered object
Smarty_Compiler::_compile_file in includes/moodle/lib/smarty/Smarty_Compiler.class.php
compile a resource
Smarty_Compiler::_compile_registered_object_tag in includes/moodle/lib/smarty/Smarty_Compiler.class.php
compile a registered object tag
Smarty_Compiler::_parse_modifiers in includes/moodle/lib/smarty/Smarty_Compiler.class.php
parse modifier chain into PHP code
Smarty_Compiler::_syntax_error in includes/moodle/lib/smarty/Smarty_Compiler.class.php
display Smarty syntax error

File

includes/moodle/lib/smarty/Smarty.class.php, line 1797

Class

Smarty
@package Smarty

Code

function _trigger_fatal_error($error_msg, $tpl_file = null, $tpl_line = null, $file = null, $line = null, $error_type = E_USER_ERROR) {
  if (isset($file) && isset($line)) {
    $info = ' (' . basename($file) . ", line {$line})";
  }
  else {
    $info = '';
  }
  if (isset($tpl_line) && isset($tpl_file)) {
    $this
      ->trigger_error('[in ' . $tpl_file . ' line ' . $tpl_line . "]: {$error_msg}{$info}", $error_type);
  }
  else {
    $this
      ->trigger_error($error_msg . $info, $error_type);
  }
}