From fe7c6f61e6ce6a18b3891bce5019b4785c3d4de7 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Tue, 3 Apr 2012 21:54:27 +0200 Subject: [PATCH] better rst error handling --- src/phorkie/Renderer/ReStructuredText.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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; } -- 2.30.2