Index: admin_templates/tools/compile_complete.tpl
===================================================================
--- admin_templates/tools/compile_complete.tpl (revision 15359)
+++ admin_templates/tools/compile_complete.tpl (working copy)
@@ -41,7 +41,13 @@
|
|
- |
+
+
+ :
+
+
+
+ |
Index: kernel/nparser/compiler.php
===================================================================
--- kernel/nparser/compiler.php (revision 15359)
+++ kernel/nparser/compiler.php (working copy)
@@ -51,8 +51,8 @@
try {
$this->Application->Parser->CheckTemplate($a_template['module'] . '/' . $a_template['path']);
- } catch ( ParserException $e ) {
- $this->Errors[] = Array ('msg' => $e->getMessage(), 'file' => $e->getFile(), 'line' => $e->getLine());
+ } catch ( Exception $e ) {
+ $this->Errors[] = Array ('message' => $e->getMessage(), 'exception_class' => get_class($e), 'file' => $e->getFile(), 'line' => $e->getLine());
}
$i++;
Index: kernel/utility/factory.php
===================================================================
--- kernel/utility/factory.php (revision 15359)
+++ kernel/utility/factory.php (working copy)
@@ -69,7 +69,7 @@
*
* @param string $class_name
* @return void
- * @throws Exception
+ * @throws kFactoryException
* @access public
*/
public function autoload($class_name)
@@ -80,7 +80,7 @@
}
if ( !file_exists(FULL_PATH . $this->Files[$class_name]) ) {
- throw new Exception('File ' . FULL_PATH . $this->Files[$class_name] . ' containing class ' . $class_name . ' definition not found');
+ throw new kFactoryException('File ' . FULL_PATH . $this->Files[$class_name] . ' containing class ' . $class_name . ' definition not found');
}
kUtil::includeOnce(FULL_PATH . $this->Files[$class_name]);
@@ -141,6 +141,7 @@
* @param Array $arguments
* @return kBase
* @access public
+ * @throws kFactoryException
*/
public function getObject($name, $pseudo_class = '', $event_params = Array (), $arguments = Array ())
{
@@ -160,7 +161,7 @@
$error_msg = 'RealClass not defined for pseudo_class ' . $pseudo_class . '';
if ( $this->Application->isInstalled() ) {
- throw new Exception($error_msg);
+ throw new kFactoryException($error_msg);
}
else {
if ( $this->Application->isDebugMode() ) {
@@ -287,4 +288,9 @@
{
unset($this->Files[$real_class]);
}
+}
+
+
+class kFactoryException extends Exception {
+
}
\ No newline at end of file
Index: units/admin/admin_tag_processor.php
===================================================================
--- units/admin/admin_tag_processor.php (revision 15419)
+++ units/admin/admin_tag_processor.php (working copy)
@@ -851,11 +851,11 @@
$ret = '';
$errors = unserialize($errors);
+ $path_regexp = '/^' . preg_quote(FULL_PATH, '/') . '/';
foreach ($errors as $an_error) {
- $block_params['file'] = str_replace(FULL_PATH, '', $an_error['file']);
- $block_params['line'] = $an_error['line'];
- $block_params['message'] = $an_error['msg'];
+ $block_params = array_merge($block_params, $an_error);
+ $block_params['file'] = preg_replace($path_regexp, '', $an_error['file'], 1);
$ret .= $this->Application->ParseBlock($block_params);
}
@@ -875,6 +875,18 @@
return count( unserialize($errors) );
}
+ /**
+ * Detects if given exception isn't one caused by tag error
+ *
+ * @param Array $params
+ * @return string
+ * @access protected
+ */
+ protected function IsParserException($params)
+ {
+ return mb_strtolower($params['class']) == 'parserexception';
+ }
+
function ExportData($params)
{
$export_helper = $this->Application->recallObject('CSVHelper');