mac
2023-12-27 5df76d441a853b1a5d2dff018c01327eb3a717b3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package com.hdl.linkpm.sdk.utils;
 
import com.google.gson.JsonObject;
import com.hdl.linkpm.sdk.core.exception.HDLException;
import com.hdl.linkpm.sdk.core.exception.HDLLinkCopyException;
import com.hdl.log.enums.Level;
import com.hdl.log.utils.LogUtil;
 
/**
 * Created by Zoro
 * Created on 2023/4/7
 * description:
 */
public class HDLExceptionSubmitUtils {
    public static void submit(String requestUrl, JsonObject json, HDLException e) {
        try {
            LogUtil.log(requestUrl, "code:" + e.getCode() + "--msg:" + e.getMsg() + "--params:" + HDLGsonUtils.toJson(json), null, Level.high);
        } catch (Exception e1) {
 
        }
    }
 
    public static void submit(String requestUrl, JsonObject json, Throwable e) {
        try {
            LogUtil.log(requestUrl, "code:" + e.getMessage() + "--msg:" + e.getMessage() + "--params:" + HDLGsonUtils.toJson(json), null, Level.high);
        } catch (Exception e1) {
 
        }
    }
 
    public static void submit(String requestUrl, Object json, HDLException e) {
        try {
            LogUtil.log(requestUrl, "code:" + e.getCode() + "--msg:" + e.getMsg() + "--params:" + HDLGsonUtils.toJson(json), null, Level.high);
        } catch (Exception e1) {
        }
    }
 
    public static void submit(String requestUrl, Object json, HDLLinkCopyException e) {
        try {
            LogUtil.log(requestUrl, "code:" + e.getCode() + "--msg:" + e.getMsg() + "--params:" + HDLGsonUtils.toJson(json), null, Level.high);
        } catch (Exception e1) {
 
        }
    }
 
}