mirror of
https://github.com/smarty-php/smarty.git
synced 2026-05-05 20:24:18 +02:00
- improvement added patch for additional SmartyCompilerException properties for better access to scource information (forum topic 24559)
This commit is contained in:
@@ -798,7 +798,12 @@ abstract class Smarty_Internal_TemplateCompilerBase
|
||||
$error_text .= ', expected one of: ' . implode(' , ', $expect);
|
||||
}
|
||||
}
|
||||
throw new SmartyCompilerException($error_text);
|
||||
$e = new SmartyCompilerException($error_text);
|
||||
$e->line = $line;
|
||||
$e->source = trim(preg_replace('![\t\r\n]+!', ' ', $match[$line - 1]));
|
||||
$e->desc = $args;
|
||||
$e->template = $this->template->source->filepath;
|
||||
throw $e;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user