Commit f713f093 by 杨铁龙

parserMessage 用try catch

parent a6262f4c
Showing with 4 additions and 0 deletions
......@@ -17,6 +17,7 @@ const mapping = new Map<MessageType, string>([
])
export function parserMessage(type: MessageType, rawMsg: string) {
try {
if (!type) return "";
if (!rawMsg) return "";
if (type === MessageType.Text) {
......@@ -41,4 +42,7 @@ export function parserMessage(type: MessageType, rawMsg: string) {
return `[${t}]`;
}
return `[系统自动回复]`;
} catch {
return ""
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment