File tree Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Original file line number Diff line number Diff line change @@ -59,20 +59,24 @@ protected function bindTo($self, \Closure $closure): \Closure
5959 */
6060 protected function lockProvider ($ self , string $ name , int $ seconds ): Lock
6161 {
62- /**
63- * @var LockProvider $store
64- */
65- $ store = Cache::getStore ();
66- $ enabled = config ('wallet.lock.enabled ' , false );
62+ try {
63+ /**
64+ * @var LockProvider $store
65+ */
66+ $ store = Cache::getStore ();
67+ $ enabled = config ('wallet.lock.enabled ' , false );
6768
68- if ($ enabled && $ store instanceof LockProvider) {
69- $ class = \get_class ($ self );
70- $ uniqId = $ class . $ this ->uniqId ;
71- if ($ self instanceof Model) {
72- $ uniqId = $ class . $ self ->getKey ();
73- }
69+ if ($ enabled && $ store instanceof LockProvider) {
70+ $ class = \get_class ($ self );
71+ $ uniqId = $ class . $ this ->uniqId ;
72+ if ($ self instanceof Model) {
73+ $ uniqId = $ class . $ self ->getKey ();
74+ }
7475
75- return $ store ->lock ("$ name. $ uniqId " , $ seconds );
76+ return $ store ->lock ("$ name. $ uniqId " , $ seconds );
77+ }
78+ } catch (\Throwable $ throwable ) {
79+ // write error's
7680 }
7781
7882 return new EmptyLock ();
You can’t perform that action at this time.
0 commit comments