[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [7623] API: errorhandling
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [7623] API: errorhandling |
Date: |
Fri, 16 Sep 2011 08:23:32 +0000 |
Revision: 7623
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7623
Author: sigurdne
Date: 2011-09-16 08:23:32 +0000 (Fri, 16 Sep 2011)
Log Message:
-----------
API: errorhandling
Modified Paths:
--------------
trunk/phpgwapi/inc/class.log.inc.php
trunk/phpgwapi/inc/class.xslttemplates.inc.php
Modified: trunk/phpgwapi/inc/class.log.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.log.inc.php 2011-09-16 08:22:44 UTC (rev
7622)
+++ trunk/phpgwapi/inc/class.log.inc.php 2011-09-16 08:23:32 UTC (rev
7623)
@@ -279,15 +279,18 @@
}
}
- echo '<h1>' . lang('Fatal Error') . "</h1>\n"
+
+ $message = '<h1>' . lang('Fatal Error') .
"</h1>\n"
. "<h2>{$msg}</h2>\n"
. '<p>' . lang('file') . ': ' .
$err->fname . "<br>\n"
. lang('line') . ': ' . $err->line .
"</p>\n"
. $trace;
+ phpgwapi_cache::message_set($message, 'error');
+
if ( isset($GLOBALS['phpgw']->common) &&
is_object($GLOBALS['phpgw']->common) )
{
-
$GLOBALS['phpgw']->common->phpgw_exit(True);
+
$GLOBALS['phpgw']->common->phpgw_exit(true);
}
}
}
Modified: trunk/phpgwapi/inc/class.xslttemplates.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.xslttemplates.inc.php 2011-09-16 08:22:44 UTC
(rev 7622)
+++ trunk/phpgwapi/inc/class.xslttemplates.inc.php 2011-09-16 08:23:32 UTC
(rev 7623)
@@ -395,12 +395,28 @@
if (!$html || $html == '<?xml version="1.0"?>')
{
+ $message ='Systemfeil - kontakt adminstrator';
+
+
if(isset($GLOBALS['phpgw_info']['user']['apps']['admin']) &&
$GLOBALS['phpgw_info']['user']['apps']['admin'])
+ {
+ phpgwapi_cache::message_set($message,
'error');
+ }
+ else
+ {
+ $message .= '<br>' .
$_SERVER['SERVER_ADDR'] . $_SERVER['SCRIPT_NAME'];
+ $message .=
isset($_REQUEST['menuaction']) ? "?menuaction={$_REQUEST['menuaction']}" : '';
+ echo '<div class="error">';
+ echo $message;
+ echo '</div>';
+ }
+/*
_debug_array(libxml_get_last_error());
echo "<h2>xml-data</h2>";
$this->list_lineno($this->xmldata, true);
echo "<h2>xsl-data</h2>";
$this->list_lineno($this->xsldata);
+*/
return '';
}
return preg_replace('/<!DOCTYPE([^>])+>/', '', $html);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [7623] API: errorhandling,
Sigurd Nes <=