public final class StackWriter extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
addAppPackage(String newAppPackage)
Ignores the errors thrown (directly or indirectly) from any class under the given package.
|
static void |
addIgnoredExceptionType(Class<? extends Throwable> exceptionType)
Marks the given
exception type to be ignored on error. |
static StackWriterService |
getStackWriterService() |
static void |
registerErrorListener(ErrorListener errorListener)
Registers the given
error listener. |
static void |
setStackWriterService(StackWriterService stackWriterService) |
static Frame[] |
takeSnapshot()
Takes snapshot of the current callstack with the active
frames. |
static Frame[] |
takeSnapshot(int startDepth,
int maxFrameCount)
Takes snapshot of the current callstack from the given start depth
with the active
frames at most as given max frame count. |
static Frame[] |
takeSnapshotWithMaxFrameCount(int maxFrameCount)
Takes snapshot of the current callstack
with the active
frames at most as given max frame count. |
static Frame[] |
takeSnapshotWithStartDepth(int startDepth)
Takes snapshot of the current callstack from the given start depth
with the active
frames. |
static void |
useErrorFilter(ErrorFilter errorFilter)
Uses the given
error filter while filtering errors. |
public static StackWriterService getStackWriterService()
public static void setStackWriterService(StackWriterService stackWriterService)
public static Frame[] takeSnapshot()
frames.frames in the current callstackpublic static Frame[] takeSnapshot(int startDepth, int maxFrameCount)
frames at most as given max frame count.public static Frame[] takeSnapshotWithStartDepth(int startDepth)
frames.public static Frame[] takeSnapshotWithMaxFrameCount(int maxFrameCount)
frames at most as given max frame count.public static void addAppPackage(String newAppPackage)
newAppPackage - the package to ignore errors thrown frompublic static void addIgnoredExceptionType(Class<? extends Throwable> exceptionType)
exception type to be ignored on error.exceptionType - the exception type to be marked as ignored on error.public static void useErrorFilter(ErrorFilter errorFilter)
error filter while filtering errors.errorFilter - the error filter to be used while filtering errorspublic static void registerErrorListener(ErrorListener errorListener)
error listener.errorListener - the error listener to be registeredCopyright © 2022. All rights reserved.