Browse Source

Coverager: better error displaying

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@185 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
1.2
Xuefer 15 years ago
parent
commit
4aa68f9317
  1. 1
      coverager/coverager.css
  2. 6
      coverager/coverager.php
  3. 5
      coverager/coverager.tpl.php

1
coverager/coverager.css

@ -60,3 +60,4 @@ pre.code {
}
.footnote { text-align: right; font-size: 12px; }
.error { color: red; }

6
coverager/coverager.php

@ -124,10 +124,12 @@ class XcacheCoverageViewer
}
}
else if (!$this->datadir) {
$action = 'require xcache.coveragedump_directory';
$action = 'error';
$error = 'require `ini:xcache.coveragedump_directory` or `config:$datadir` to be set';
}
else {
$action = "no data";
$action = 'error';
$error = "no data";
}
$xcache_version = defined('XCACHE_VERSION') ? XCACHE_VERSION : '';

5
coverager/coverager.tpl.php

@ -225,7 +225,10 @@ EOS;
}
}
else {
echo htmlspecialchars($action);
$error_html = htmlspecialchars($error);
echo <<<EOS
<span class="error">{$error_html}</span>
EOS;
}
?>

Loading…
Cancel
Save