Catch all exceptions.

This commit is contained in:
flash 2024-03-25 20:47:22 +00:00
parent dc012fa8a6
commit 5d1fe28723

View file

@ -1,6 +1,7 @@
<?php <?php
namespace Makai\Whois; namespace Makai\Whois;
use Exception;
use Memcached; use Memcached;
use Index\Routing\Route; use Index\Routing\Route;
use Index\Routing\RouteHandler; use Index\Routing\RouteHandler;
@ -58,7 +59,7 @@ class WhoisRoutes extends RouteHandler {
$result = unserialize($result); $result = unserialize($result);
$source = 'cache'; $source = 'cache';
} }
} catch (\RuntimeException $ex) { } catch (Exception $ex) {
return [ return [
'error' => true, 'error' => true,
'text' => $ex->getMessage(), 'text' => $ex->getMessage(),