From a6b8a61f5d5ba285786a2fe1641a858d510751ea Mon Sep 17 00:00:00 2001 From: rurban Date: Tue, 12 Oct 2004 15:34:47 +0000 Subject: [PATCH] redirect stderr to display the failing msg git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@4028 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/plugin/VisualWiki.php | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/lib/plugin/VisualWiki.php b/lib/plugin/VisualWiki.php index cef6ae710..da798afb5 100644 --- a/lib/plugin/VisualWiki.php +++ b/lib/plugin/VisualWiki.php @@ -1,5 +1,5 @@ createDotFile($tempfiles.'.dot',$argarray) // && $this->filterThroughCmd('',"$dotbin -T$gif $tempfiles.dot -o $outfile") // && $this->filterThroughCmd('',"$dotbin -Timap $tempfiles.dot -o ".$tempfiles.".map") - && $this->execute("$dotbin -T$gif $tempfiles.dot -o $outfile" . ($debug ? " > $tempout 2>&1" : ""), $outfile) - && $this->execute("$dotbin -Timap $tempfiles.dot -o ".$tempfiles.".map" . ($debug ? " > $tempout 2>&1" : ""), $tempfiles.".map") + && $this->execute("$dotbin -T$gif $tempfiles.dot -o $outfile" . + ($debug ? " > $tempout 2>&1" : " 2>&1"), $outfile) + && $this->execute("$dotbin -Timap $tempfiles.dot -o ".$tempfiles.".map" . + ($debug ? " > $tempout 2>&1" : " 2>&1"), $tempfiles.".map") && file_exists( $outfile ) && file_exists( $tempfiles.'.map' ) && ($img = $ImageCreateFromFunc($outfile)) @@ -699,9 +701,12 @@ extends WikiPluginCached fclose($fp); //trigger_error("url=".$url); } else { - trigger_error(" -$outfile: ".(file_exists($outfile) ? filesize($outfile):'missing')." -$tempfiles.map: ".(file_exists("$tempfiles.map") ? filesize("$tempfiles.map"):'missing'), E_USER_WARNING); + $this->_errortext = + ("$outfile: ".(file_exists($outfile) ? filesize($outfile):'missing')."\n". + "$tempfiles.map: ".(file_exists("$tempfiles.map") ? filesize("$tempfiles.map"):'missing')); + $this->_errortext .= ("\ncmd-line: $dotbin -T$gif $tempfiles.dot -o $outfile"); + trigger_error($this->_errortext, E_USER_WARNING); + return array(false, false); } // clean up tempfiles @@ -818,6 +823,11 @@ function interpolate($a, $b, $pos) { } // $Log: not supported by cvs2svn $ +// Revision 1.15 2004/09/08 13:38:00 rurban +// improve loadfile stability by using markup=2 as default for undefined markup-style. +// use more refs for huge objects. +// fix debug=static issue in WikiPluginCached +// // Revision 1.14 2004/09/07 13:26:31 rurban // new WikiPluginCached option debug=static and some more sf.net defaults for VisualWiki // -- 2.45.0