Преглед на файлове

一键替换了 35 - 1 个 抓不住的 Exception

围墙 преди 7 години
родител
ревизия
a55dc42bcd

+ 1 - 1
app/Command/DailyMail.php

@@ -42,7 +42,7 @@ class DailyMail
                         "user" => $user,"text" => $text,"lastday"=>$lastday
                     ], [
                     ]);
-                } catch (Exception $e) {
+                } catch (\Exception $e) {
                     echo $e->getMessage();
                 }
                 $text="";

+ 2 - 2
app/Command/ExtMail.php

@@ -23,7 +23,7 @@ class ExtMail
                     "user" => $user,"text" => $text
                 ], [
                 ]);
-                } catch (Exception $e) {
+                } catch (\Exception $e) {
                     echo $e->getMessage();
                 }
             }
@@ -44,7 +44,7 @@ class ExtMail
                         "user" => $user,"text" => $text
                     ], [
                     ]);
-                } catch (Exception $e) {
+                } catch (\Exception $e) {
                     echo $e->getMessage();
                 }
             }

+ 3 - 3
app/Command/FinanceMail.php

@@ -78,7 +78,7 @@ class FinanceMail
 			"user" => $user,"title"=>$title,"text" => $text
 			], [
 			]);
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 			echo $e->getMessage();
 			}
 		}
@@ -143,7 +143,7 @@ class FinanceMail
 			"user" => $user,"title"=>$title,"text" => $text
 			], [
 			]);
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 			echo $e->getMessage();
 			}
 		}
@@ -205,7 +205,7 @@ class FinanceMail
 			"user" => $user,"title"=>$title,"text" => $text
 			], [
 			]);
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 			echo $e->getMessage();
 			}
 		}

+ 17 - 17
app/Command/Job.php

@@ -78,7 +78,7 @@ class Job
                 "text" => $text
             ], ["/tmp/ssmodbackup.zip"
             ]);
-        } catch (Exception $e) {
+        } catch (\Exception $e) {
             echo $e->getMessage();
         }
         system("rm -rf /tmp/ssmodbackup", $ret);
@@ -180,7 +180,7 @@ class Job
                           "user" => $user,"text" => $text
                       ], [
                       ]);
-                  } catch (Exception $e) {
+                  } catch (\Exception $e) {
                       echo $e->getMessage();
                   }
                 }
@@ -210,7 +210,7 @@ class Job
                         "user" => $user,"text" => $text
                     ], [
                     ]);
-                } catch (Exception $e) {
+                } catch (\Exception $e) {
                     echo $e->getMessage();
                 }
             }
@@ -397,7 +397,7 @@ class Job
                         "user" => $user,"text" => $text
                     ], [
                     ]);
-                } catch (Exception $e) {
+                } catch (\Exception $e) {
                     echo $e->getMessage();
                 }
 
@@ -414,7 +414,7 @@ class Job
                             "user" => $user,"text" => $text
                         ], [
                         ]);
-                    } catch (Exception $e) {
+                    } catch (\Exception $e) {
                         echo $e->getMessage();
                     }
                     $myfile = fopen(BASE_PATH."/storage/".$bought->id.".renew", "w+") or die("Unable to open file!");
@@ -454,7 +454,7 @@ class Job
                                 "user" => $user,"text" => $text
                             ], [
                             ]);
-                        } catch (Exception $e) {
+                        } catch (\Exception $e) {
                             echo $e->getMessage();
                         }
                     }
@@ -486,7 +486,7 @@ class Job
                                 "user" => $user,"text" => $text
                             ], [
                             ]);
-                        } catch (Exception $e) {
+                        } catch (\Exception $e) {
                             echo $e->getMessage();
                         }
 
@@ -552,7 +552,7 @@ class Job
                                 "user" => $user,"text" => $text
                             ], [
                             ]);
-                        } catch (Exception $e) {
+                        } catch (\Exception $e) {
                             echo $e->getMessage();
                         }
 
@@ -629,7 +629,7 @@ class Job
                                         "user" => $user,"text" => $text
                                     ], [
                                     ]);
-                                } catch (Exception $e) {
+                                } catch (\Exception $e) {
                                     echo $e->getMessage();
                                 }
                             }
@@ -664,7 +664,7 @@ class Job
                             "user" => $user,"text" => $text
                         ], [
                         ]);
-                    } catch (Exception $e) {
+                    } catch (\Exception $e) {
                         echo $e->getMessage();
                     }
                 }
@@ -704,7 +704,7 @@ class Job
 						$txt = "1";
 						fwrite($myfile, $txt);
 						fclose($myfile);
-                    } catch (Exception $e) {
+                    } catch (\Exception $e) {
                         echo $e->getMessage();
                     }
                 }
@@ -725,7 +725,7 @@ class Job
                             "user" => $user,"text" => $text
                         ], [
                         ]);
-                    } catch (Exception $e) {
+                    } catch (\Exception $e) {
                         echo $e->getMessage();
                     }
 
@@ -751,7 +751,7 @@ class Job
                         "user" => $user,"text" => $text
                     ], [
                     ]);
-                } catch (Exception $e) {
+                } catch (\Exception $e) {
                     echo $e->getMessage();
                 }
                 $user->kill_user();
@@ -771,7 +771,7 @@ class Job
                         "user" => $user,"text" => $text
                     ], [
                     ]);
-                } catch (Exception $e) {
+                } catch (\Exception $e) {
                     echo $e->getMessage();
                 }
                 $user->kill_user();
@@ -793,7 +793,7 @@ class Job
                             "user" => $user,"text" => $text
                         ], [
                         ]);
-                    } catch (Exception $e) {
+                    } catch (\Exception $e) {
                         echo $e->getMessage();
                     }
                 }
@@ -872,7 +872,7 @@ class Job
 									], [
 								]);
 							}
-							catch (Exception $e) {
+							catch (\Exception $e) {
 								echo $e->getMessage();
 							}
 							if (Config::get('enable_cloudxns')=='true' && ($node->sort==0 || $node->sort==10)) {
@@ -927,7 +927,7 @@ class Job
 				                      ], [
 				                         ]);
 							}
-							catch (Exception $e) {
+							catch (\Exception $e) {
 								echo $e->getMessage();
 							}
 							if (Config::get('enable_cloudxns')=='true'&& ($node->sort==0 || $node->sort==10)) {

+ 1 - 1
app/Command/SyncRadius.php

@@ -177,7 +177,7 @@ class SyncRadius
                     "user" => $user,"text" => $text
                 ], [
                 ]);
-            } catch (Exception $e) {
+            } catch (\Exception $e) {
                 echo $e->getMessage();
             }
         }

+ 1 - 1
app/Controllers/Admin/AnnController.php

@@ -56,7 +56,7 @@ class AnnController extends AdminController
                             "user" => $user,"text" => $text
                         ], [
                         ]);
-                    } catch (Exception $e) {
+                    } catch (\Exception $e) {
                         continue;
                     }
                 }

+ 1 - 1
app/Controllers/Admin/TicketController.php

@@ -65,7 +65,7 @@ class TicketController extends AdminController
                         "user" => $user,"text" => $text
                     ], [
                     ]);
-                } catch (Exception $e) {
+                } catch (\Exception $e) {
                     echo $e->getMessage();
                 }
             }

+ 1 - 1
app/Controllers/AuthController.php

@@ -252,7 +252,7 @@ class AuthController extends BaseController
                 ], [
                     //BASE_PATH.'/public/assets/email/styles.css'
                 ]);
-            } catch (Exception $e) {
+            } catch (\Exception $e) {
                 return false;
             }
 

+ 3 - 3
app/Controllers/UserController.php

@@ -1391,7 +1391,7 @@ class UserController extends BaseController
                     "user" => $user, "text" => $text
                 ], [
                 ]);
-            } catch (Exception $e) {
+            } catch (\Exception $e) {
                 echo $e->getMessage();
             }
         }
@@ -1437,7 +1437,7 @@ class UserController extends BaseController
                         "user" => $user, "text" => $text
                     ], [
                     ]);
-                } catch (Exception $e) {
+                } catch (\Exception $e) {
                     echo $e->getMessage();
                 }
             }
@@ -1452,7 +1452,7 @@ class UserController extends BaseController
                         "user" => $user, "text" => $text
                     ], [
                     ]);
-                } catch (Exception $e) {
+                } catch (\Exception $e) {
                     echo $e->getMessage();
                 }
             }

+ 1 - 1
app/Services/Gateway/AopF2F.php

@@ -81,7 +81,7 @@ class AopF2F extends AbstractPayment
                 self::postPayment($pid, "支付宝当面付");
                 die('success'); //The response should be 'success' only
             }
-        } catch (Exception $e) {
+        } catch (\Exception $e) {
             die('fail');
         }
     }

+ 1 - 1
app/Services/Password.php

@@ -34,7 +34,7 @@ class Password
             ], [
                 //BASE_PATH.'/public/assets/email/styles.css'
             ]);
-        } catch (Exception $e) {
+        } catch (\Exception $e) {
             return false;
         }
         return true;