git.cweiske.de
/
phorkie.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
better rst error handling
[phorkie.git]
/
src
/
phorkie
/
Renderer
/
ReStructuredText.php
diff --git
a/src/phorkie/Renderer/ReStructuredText.php
b/src/phorkie/Renderer/ReStructuredText.php
index 136de16cf0ba1880b064d72f85e27bf120c7c91b..7ecc2f70aa13d3658b2fda1452c114fbe5431b08 100644
(file)
--- 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)) {
);
$process = proc_open('rst2html', $descriptorspec, $pipes);
if (!is_resource($process)) {
- //FIXME: fallback to geshi
- return $file->getContent();
+ return '<div class="alert alert-error">'
+ . 'Cannot open process to execute rst2html'
+ . '</div>';
}
fwrite($pipes[0], $file->getContent());
}
fwrite($pipes[0], $file->getContent());
@@
-44,7
+45,7
@@
class Renderer_ReStructuredText
if ($retval != 0) {
$html = '<div class="alert">'
. 'rst2html encountered some error; return value ' . $retval . '<br/>'
if ($retval != 0) {
$html = '<div class="alert">'
. 'rst2html encountered some error; return value ' . $retval . '<br/>'
- . 'Error message:' . $errors
+ . 'Error message:
' . $errors
. '</div>'
. $html;
}
. '</div>'
. $html;
}