StackTraceUtils
Utility methods for the stack.
Methods
isCallingMe
Description:
Method | Return values | Description |
---|---|---|
isCallingMe(String className) |
Boolean |
Return true when a className is in the current stack |
Example:
package com.openkm;
package com.openkm.test;
import com.openkm.spring.PrincipalUtils;
public class Test {
public static void main(String[] args) throws Exception {
System.out.println(StackTraceUtilsUtils.isCallingMe("com.openkm.automation.action.UpdateByMetadata"));
}
}
toString
Description:
Method | Return values | Description |
---|---|---|
toString(Throwable t) |
String |
Return exception stack as standard text. |
Example:
package com.openkm;
package com.openkm.test;
import com.openkm.spring.PrincipalUtils;
public class Test {
public static void main(String[] args) throws Exception {
try {
// Force exception
List keys = null;
for (String key : keys) {
}
} catch (Exception e) {
System.out.println(StackTraceUtilsUtils.toString(e));
}
}
}