From: Christian Weiske Date: Tue, 3 Apr 2012 19:54:27 +0000 (+0200) Subject: better rst error handling X-Git-Tag: v0.1.0~62 X-Git-Url: https://git.cweiske.de/phorkie.git/commitdiff_plain/fe7c6f61e6ce6a18b3891bce5019b4785c3d4de7?hp=7bf061541b0424b427bbbd1300e81d12190c9c54 better rst error handling --- diff --git a/src/phorkie/Renderer/ReStructuredText.php b/src/phorkie/Renderer/ReStructuredText.php index 136de16..7ecc2f7 100644 --- a/src/phorkie/Renderer/ReStructuredText.php +++ b/src/phorkie/Renderer/ReStructuredText.php @@ -22,8 +22,9 @@ class Renderer_ReStructuredText ); $process = proc_open('rst2html', $descriptorspec, $pipes); if (!is_resource($process)) { - //FIXME: fallback to geshi - return $file->getContent(); + return '
' + . 'Cannot open process to execute rst2html' + . '
'; } fwrite($pipes[0], $file->getContent()); @@ -44,7 +45,7 @@ class Renderer_ReStructuredText if ($retval != 0) { $html = '
' . 'rst2html encountered some error; return value ' . $retval . '
' - . 'Error message:' . $errors + . 'Error message: ' . $errors . '
' . $html; }