/home/techb158/public_html/wp-content/plugins/kirki/libraries/framework
Edit: /home/techb158/public_html/wp-content/plugins/kirki/libraries/framework/SiteExceptionHandler.php (2076B)
getMessage() ?: 'Forbidden');
}
if ($exception instanceof ModelNotFoundException) {
static::fail(Response::NOT_FOUND, $exception->getMessage() ?: 'Not Found');
}
if ($exception instanceof ValidationException) {
static::fail(Response::UNPROCESSABLE_ENTITY, $exception->getMessage() ?: 'Validation failed');
}
$status = (int) $exception->getCode();
if ($status < 100 || $status > 599) {
$status = Response::INTERNAL_SERVER_ERROR;
}
if (\function_exists('error_log')) {
\error_log($exception->getMessage());
}
static::fail($status, $exception->getMessage() ?: 'Internal Server Error');
}
/**
* Stop the request with a WordPress error page at the given HTTP status.
*
* @param int $status HTTP status code.
* @param string $message Error message.
*
* @return void
*
* @since 1.0.0
*/
protected static function fail(int $status, string $message)
{
status_header($status);
nocache_headers();
wp_die(esc_html($message), esc_html($message), ['response' => $status]);
}
}