public class ExceptionUtils extends Object
Constructor and Description |
---|
ExceptionUtils() |
Modifier and Type | Method and Description |
---|---|
static com.alibaba.fastjson.JSONObject |
getPrintExceptionToJson(Throwable e)
获得打印异常内容
|
static com.alibaba.fastjson.JSONObject |
getPrintExceptionToJson(Throwable e,
Integer line)
获得打印异常内容
|
static String |
getPrintExceptionToStr(Throwable e)
获得打印异常内容
|
static String |
getPrintExceptionToStr(Throwable e,
Integer line)
获得打印异常内容
|
static void |
printException(Throwable e)
获得打印异常内容
|
static void |
printException(Throwable e,
Integer line)
获得打印异常内容
|
public static String getPrintExceptionToStr(Throwable e)
默认只打印关键的5行内容
e
- 异常public static String getPrintExceptionToStr(Throwable e, @Nullable Integer line)
e
- 异常line
- 打印行数public static com.alibaba.fastjson.JSONObject getPrintExceptionToJson(Throwable e)
默认只打印关键的5行内容
e
- 异常public static com.alibaba.fastjson.JSONObject getPrintExceptionToJson(Throwable e, @Nullable Integer line)
e
- 异常line
- 打印行数public static void printException(Throwable e)
默认只打印关键的5行内容
e
- 异常Copyright © 2022 Pivotal Software, Inc.. All rights reserved.