Inline error (similar to missing) instead of global breakage.
- include "$name.php";
- $html = ob_get_clean();
+ try {
+ include "$name.php";
+ $html = ob_get_clean();
+ }
+ catch (Exception $e) {
+ $html = sprintf('<strong class="warn">%s</strong>',
+ "fout in <em>$name</em>: {$e->getMessage()}"
+ );
+ }
}
else {
$html = '<strong class="warn"><em>'.$name.'</em> ontbreekt</strong>';
}
else {
$html = '<strong class="warn"><em>'.$name.'</em> ontbreekt</strong>';