|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.linkedin.groovy.util.json.JsonUtils
org.linkedin.glu.groovy.utils.json.GluGroovyJsonUtils
class GluGroovyJsonUtils extends JsonUtils
Method Summary | |
---|---|
static java.lang.String
|
exceptionToJSON(java.lang.Object exception, boolean prettyPrintJson = false)
Extracts the exception stack trace and all causes and returns it as a json string |
static T
|
extractFullStackTrace(java.lang.Object exception, T out = [])
Extracts the exception stack trace and all causes. |
static java.util.Collection
|
extractStackTrace(java.lang.Object exception)
Returns the stack trace elements as a collection of maps: |
static java.lang.Throwable
|
rebuildException(java.lang.Object fullStackTrace)
This method is the opposite of extractFullStackTrace(Throwable) and will attempt to "deserialize" the full stack trace into the original exception including all the chain of causes. |
static StackTraceElement[]
|
rebuildStackTrace(java.lang.Object stackTrace)
Opposite of extractStackTrace |
Method Detail |
---|
static java.lang.String exceptionToJSON(java.lang.Object exception, boolean prettyPrintJson = false)
prettyPrintJson
- if you want to pretty print the output... otherwise compact print
static T extractFullStackTrace(java.lang.Object exception, T out = [])
name
, message
and stackTrace
.
stackTrace
is a collection of map: dc
(class name),
mn
method name, fn
field name and ln
line number
out
static java.util.Collection extractStackTrace(java.lang.Object exception)
dc
(class name),
mn
method name, fn
field name and ln
line number
static java.lang.Throwable rebuildException(java.lang.Object fullStackTrace)
static StackTraceElement[] rebuildStackTrace(java.lang.Object stackTrace)
Groovy Documentation