From: hickert Date: Tue, 6 Apr 2010 08:29:10 +0000 (+0000) Subject: Added more verbose errors X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ba16a8c5351fe5dc269637d858a5e6071a940669;p=gosa.git Added more verbose errors git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17477 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc b/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc index 012894b15..64c36bf49 100644 --- a/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc +++ b/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc @@ -212,7 +212,11 @@ class macro extends plugin if(!$res){ new log("debug","gofonmacro/".get_class($this),"",array(),@mysql_error($r_current)); @DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,"".$query."", "ERROR"); - return ( msgPool::dbquery("GOfon",@mysql_error($r_current),$Server['SERVER'])); + trigger_error(mysql_error($r_current)); + return( + sprintf( + _("Macro could not be removed from server '%s', please check database consistency!"), + $Server['SERVER'])); } @mysql_close($r_current); } @@ -318,6 +322,11 @@ class macro extends plugin if(!$res){ new log("debug","gofonmacro/".get_class($this),"",array(),@mysql_error($r_con)); @DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,"".$query."", "ERROR"); + trigger_error(mysql_error($r_con)); + return( + sprintf( + _("Macro could not be added to server '%s', please check database consistency!"), + $cfg['SERVER'])); } @mysql_close($r_con); }