Grails utility methods for command line and GUI applications.
Type Params | Return Type | Name and description |
---|---|---|
|
static java.lang.Throwable |
deepSanitize(java.lang.Throwable t) |
|
static void |
deprecated(java.lang.Class<?> clazz, java.lang.String methodOrPropName) Logs warning message about deprecation of specified property or method of some class. |
|
static void |
deprecated(java.lang.Class<?> clazz, java.lang.String methodOrPropName, java.lang.String version) Logs warning message about deprecation of specified property or method of some class. |
|
static void |
deprecated(java.lang.String message) Logs warning message about some deprecation and code style related hints. |
|
static java.lang.Throwable |
extractRootCause(java.lang.Throwable t) |
|
static java.lang.String |
getEnvironment() Retrieves the current execution environment. |
|
static java.lang.String |
getGrailsVersion() |
|
static boolean |
isDevelopmentEnv() Retrieves whether the current execution environment is the development one. |
|
static void |
printSanitizedStackTrace(java.lang.Throwable t, java.io.PrintWriter p) |
|
static void |
printSanitizedStackTrace(java.lang.Throwable t, java.io.PrintWriter p, StackTraceFilterer stackTraceFilterer) |
|
static void |
printSanitizedStackTrace(java.lang.Throwable t) |
|
static java.lang.Throwable |
sanitize(java.lang.Throwable t) |
|
static java.lang.Throwable |
sanitizeRootCause(java.lang.Throwable t) |
|
static void |
warn(java.lang.String message) Logs warning message to grails.util.GrailsUtil logger which is turned on in development mode. |
|
static void |
writeSlurperResult(groovy.util.slurpersupport.GPathResult result, java.io.Writer output) Writes out a GPathResult (i.e. the result of parsing XML using XmlSlurper) to the given writer. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Sanitize the exception and ALL nested causes
This will MODIFY the stacktrace of the exception instance and all its causes irreversibly
Logs warning message about deprecation of specified property or method of some class.
clazz
- A classmethodOrPropName
- Name of deprecated property or methodLogs warning message about deprecation of specified property or method of some class.
clazz
- A classmethodOrPropName
- Name of deprecated property or methodversion
- Version of Grails release in which property or method were deprecatedLogs warning message about some deprecation and code style related hints.
message
- Message to display
Extracts the root cause of the exception, no matter how nested it is
Retrieves the current execution environment.
Retrieves whether the current execution environment is the development one.
Remove all apparently Grails-internal trace entries from the exception instance
This modifies the original instance and returns it, it does not clone
t
- The exception
Get the root cause of an exception and sanitize it for display to the user
This will MODIFY the stacktrace of the root cause exception object and return it
Logs warning message to grails.util.GrailsUtil logger which is turned on in development mode.
message
- Message to displayWrites out a GPathResult (i.e. the result of parsing XML using XmlSlurper) to the given writer.
result
- The root node of the XML to write out.output
- Where to write the XML to.