Catch all exceptions.
This commit is contained in:
parent
dc012fa8a6
commit
5d1fe28723
1 changed files with 2 additions and 1 deletions
|
@ -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(),
|
||||||
|
|
Loading…
Reference in a new issue