log exception and return null

This commit is contained in:
dongwei 2019-07-03 14:10:37 +08:00
parent c9b502ac38
commit b494903dfd

View File

@ -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;
}