From b494903dfd714b7774a43aefe22602e77cbb9810 Mon Sep 17 00:00:00 2001 From: dongwei Date: Wed, 3 Jul 2019 14:10:37 +0800 Subject: [PATCH] log exception and return null --- src/functions.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/functions.php b/src/functions.php index 8a807ed..baea2f5 100644 --- a/src/functions.php +++ b/src/functions.php @@ -32,7 +32,7 @@ function chat_text_alert ($chat, $text) $text, ]); } catch (Exception $ex) { - var_dump($ex->getMessage()); + app("log")->error("chat_notify_error", ['message' => $ex->getMessage()]); return null; } @@ -61,7 +61,7 @@ function user_text_alert ($username, $text) $text, ]); } catch (Exception $ex) { - var_dump($ex->getMessage()); + app("log")->error("chat_notify_error", ['message' => $ex->getMessage()]); return null; } @@ -97,7 +97,7 @@ function chat_card_alert ($chat, $title, $desc, $button, $url) $url, ]); } catch (Exception $ex) { - var_dump($ex->getMessage()); + app("log")->error("chat_notify_error", ['message' => $ex->getMessage()]); return null; } @@ -134,7 +134,7 @@ function user_card_alert ($username, $title, $desc, $button, $url) $url, ]); } catch (Exception $ex) { - var_dump($ex->getMessage()); + app("log")->error("chat_notify_error", ['message' => $ex->getMessage()]); return null; } @@ -175,7 +175,7 @@ function user_mp_alert ($username, $appid, $title, $page = null, $desc = null, $ $emphasisFirstItem ]); } catch (Exception $ex) { - var_dump($ex->getMessage()); + app("log")->error("chat_notify_error", ['message' => $ex->getMessage()]); return null; } @@ -215,7 +215,7 @@ function tag_mp_alert ($tag, $appid, $title, $page = null, $desc = null, $items $emphasisFirstItem ]); } catch (Exception $ex) { - var_dump($ex->getMessage()); + app("log")->error("chat_notify_error", ['message' => $ex->getMessage()]); return null; }