diff --git a/app/Libs/SsdbClient.php b/app/Libs/SsdbClient.php index ab9d6b7..de6249f 100644 --- a/app/Libs/SsdbClient.php +++ b/app/Libs/SsdbClient.php @@ -21,17 +21,19 @@ class SsdbClient //} - - public static function client($host=null,$port=null) + /** + * @throws \Exception + */ + public static function client($host=null, $port=null) { $host = $host??env('SSDB_HOST'); $port = $port??env('SSDB_PORT'); - try{ + try { $SSDB = new SimpleSSDB($host, $port); $SSDB->auth(env('SSDB_AUTH')); - }catch(\Exception $e){ - dd($e); + } catch (\Exception $e) { + throw new \Exception('SSDB:' . $e->getMessage()); } return $SSDB;