Code

Added more verbose errors
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 6 Apr 2010 08:29:10 +0000 (08:29 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 6 Apr 2010 08:29:10 +0000 (08:29 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17477 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc

index 012894b15ecb38fcf08926bfd28601dfdf5d2b65..64c36bf49c85f350e15071876e4dea6deed751bd 100644 (file)
@@ -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__,"<b>".$query."</b>", "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__,"<b>".$query."</b>", "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);
       }