Selaa lähdekoodia

print stack trace

tags/2.0.1
Jonathan Cobb 4 vuotta sitten
vanhempi
commit
4e1f46227f
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. +2
    -2
      src/main/java/org/cobbzilla/util/system/OutOfMemoryErrorUncaughtExceptionHandler.java

+ 2
- 2
src/main/java/org/cobbzilla/util/system/OutOfMemoryErrorUncaughtExceptionHandler.java Näytä tiedosto

@@ -3,8 +3,8 @@ package org.cobbzilla.util.system;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;

import static org.apache.commons.lang3.exception.ExceptionUtils.getStackTrace;
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 +18,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), e);
log.error("!!!!! OutOfMemoryError: calling System.exit("+status+") from:\n"+getStackTrace(e));
} catch (Throwable ignored) {}
System.exit(status);
} else {


Ladataan…
Peruuta
Tallenna