in src/main/java/com/intellij/rt/debugger/agent/CaptureStorage.java [65:85]
public static void capture(final Object key) {
if (!ENABLED) {
return;
}
withoutThrowableCapture(new Runnable() {
@Override
public void run() {
try {
if (DEBUG) {
System.out.println("captureGeneral " + getCallerDescriptorForLogging() + " - " + getKeyText(key));
}
CapturedStack stack = getStacksForCurrentThread().peekLast();
STORAGE_GENERAL.put(key, createCapturedStack(new Throwable(), stack));
}
// TODO: check whether it's ok to use assertions, and if we should catch Throwable everywhere
catch (AssertionError | Exception e) {
handleException(e);
}
}
});
}