Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time
/* This plugin displays a user friendly page on uncaught PHP exceptions. */
set_exception_handler(function ($exception) use ($context) {
while (ob_get_level()) {
ini_get("display_errors") == 1 ? ob_end_flush() : ob_end_clean();
error_log(sprintf("%s in %s:%d\n%s",
$exception->getFile(), $exception->getLine(),
"bodyAttributes" => ["class" => "middle body_full"],
"body" => $context->hooks->template("exception", [
"exception" => $exception,
"showMessage" =>
($exception instanceof Kanbani\PublicException) ||
($exception instanceof Kanbani\SyncFileException) ||
($exception instanceof Kanbani\QrCodeException) ||
$context->hooks->register("echo_exception", function (array $vars) {
// $exception
// $showMessage
<article class="ex middle__out">
<div class="ex__wr middle__in">
<?php if ($showMessage) {?>
<?php } else {?>
<h1><?=$this("No way!")?></h1>
"You hit an unexpected %s – contact us for assistance.",
htmlspecialchars(preg_replace('/([a-z])([A-Z])/', '\1 \2', basename(get_class($exception))))
<?php }?>
<?php if (ini_get("display_errors") == 1) {?>
<textarea readonly class="ex__trace light-shade block-area">
in <?=htmlspecialchars($exception->getFile().":".$exception->getLine())?>
<?php }?>