Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
youfanx committed Aug 2, 2024
1 parent fdf2df7 commit 888d3c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rxlib/src/main/java/org/rx/core/ThreadPool.java
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public T call() {
throw e;
} finally {
Thread t = Thread.currentThread();
TraceHandler.INSTANCE.saveMethodTrace(t, fn.getClass(), Reflects.getStackTrace(t), new Object[]{id},
TraceHandler.INSTANCE.saveMethodTrace(t, fn.getClass(), Reflects.getStackTrace(t), id == null ? null : new Object[]{id},
r, ex, System.nanoTime() - s);
}
return r;
Expand Down
3 changes: 2 additions & 1 deletion rxlib/src/main/java/org/rx/exception/TraceHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.util.concurrent.ScheduledFuture;

import static org.rx.core.Extends.as;
import static org.rx.core.Extends.ifNull;
import static org.rx.core.RxConfig.ConfigNames.TRACE_KEEP_DAYS;
import static org.rx.core.RxConfig.ConfigNames.getWithoutPrefix;
import static org.rx.core.Sys.toJsonString;
Expand Down Expand Up @@ -195,7 +196,7 @@ void innerSave(String thread, String msg, Throwable e) {
int eMsgFlag = stackTrace.indexOf("\n");
String eMsg = stackTrace.substring(0, eMsgFlag);
stackTrace = stackTrace.substring(eMsgFlag + 2);
msg = eMsg + msg;
msg = eMsg + ifNull(msg, "");

long pk = CodecUtil.hash64(stackTrace);
// Tasks.nextPool().runSerial(() -> {
Expand Down

0 comments on commit 888d3c5

Please sign in to comment.