StackTraceUtils
Utility methods for the stack.
Methods
Section titled “Methods”isCallingMe
Section titled “isCallingMe”Description:
| Method | Return values | Description |
|---|---|---|
| isCallingMe(String className) | Boolean | Returns 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
Section titled “toString”Description:
| Method | Return values | Description |
|---|---|---|
| toString(Throwable t) | String | Returns the 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)); } }}