add more graphviz debug output
authorgithub138 <m.ehinger@ltur.de>
Thu, 31 Jul 2014 13:40:16 +0000 (15:40 +0200)
committergithub138 <m.ehinger@ltur.de>
Thu, 31 Jul 2014 13:42:13 +0000 (15:42 +0200)
linkmgmt.php

index 5b7a658..0423e7e 100644 (file)
@@ -828,9 +828,18 @@ class lm_Image_GraphViz extends Image_GraphViz {
                                <ul id=\"link\" style=\"list-style-type:none\"></ul>
                        </div>";
 
+               if($debug)
+                       $gvmap->setFalseOnError(False);
+
                $data2 = '';
                $data = $gvmap->fetch($type, $command, 'cmapx', $data2);
 
+               if($data === false)
+                       echo "ERROR Fetching image data!<br>";
+
+               if(PEAR::isError($data))
+                       echo $data->getMessage();
+
                //echo $gvmap->fetch('cmapx', $command);
                echo $data2;
 
@@ -983,6 +992,11 @@ class linkmgmt_gvmap {
                error_reporting($this->errorlevel);
        }
 
+       function setFalseOnError($newvalue)
+       {
+               $this->gv->_returnFalseOnError = $newvalue;
+       }
+
        // !!!recursiv !!!
        function _add($gv, $object_id, $port_id = NULL) {
                global $lm_multilink_port_types;