From ba16a8c5351fe5dc269637d858a5e6071a940669 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 6 Apr 2010 08:29:10 +0000 Subject: [PATCH] Added more verbose errors git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17477 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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); } -- 2.30.2