Переглянути джерело

show stack of oome, not thread

tags/2.0.1
Jonathan Cobb 4 роки тому
джерело
коміт
8741752cf0
1 змінених файлів з 1 додано та 2 видалено
  1. +1
    -2
      src/main/java/org/cobbzilla/util/system/OutOfMemoryErrorUncaughtExceptionHandler.java

+ 1
- 2
src/main/java/org/cobbzilla/util/system/OutOfMemoryErrorUncaughtExceptionHandler.java Переглянути файл

@@ -4,7 +4,6 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;

import static org.cobbzilla.util.daemon.ZillaRuntime.shortError;
import static org.cobbzilla.util.daemon.ZillaRuntime.stacktrace;

@AllArgsConstructor @Slf4j
public class OutOfMemoryErrorUncaughtExceptionHandler implements Thread.UncaughtExceptionHandler {
@@ -18,7 +17,7 @@ public class OutOfMemoryErrorUncaughtExceptionHandler implements Thread.Uncaught
@Override public void uncaughtException(Thread t, Throwable e) {
if (e instanceof OutOfMemoryError) {
try {
log.error("!!!!! OutOfMemoryError: calling System.exit("+status+") from: " + stacktrace(t));
log.error("!!!!! OutOfMemoryError: calling System.exit("+status+")", e);
} catch (Throwable ignored) {}
System.exit(status);
} else {


Завантаження…
Відмінити
Зберегти