Fixed issue with meaningless stack trace for suspending methods
This commit is contained in:
parent
39503ac6d9
commit
1750e0a2b0
|
@ -260,9 +260,9 @@ internal class RmiClient(val isGlobal: Boolean,
|
|||
continuation.resumeWithException(exception)
|
||||
}
|
||||
is Exception -> {
|
||||
// reconstruct the stack trace, so the calling method knows where the method invocation happened, and can trace the call
|
||||
// this stack will ALWAYS run up to this method (so we remove from the top->down, to get to the call site)
|
||||
RmiUtils.cleanStackTraceForProxy(Exception(), any)
|
||||
// for co-routines, it's impossible to get a legit stacktrace without impacting general performance,
|
||||
// so we just don't do it.
|
||||
// RmiUtils.cleanStackTraceForProxy(Exception(), any)
|
||||
continuation.resumeWithException(any)
|
||||
}
|
||||
else -> {
|
||||
|
|
|
@ -398,12 +398,7 @@ internal class RmiManagerGlobal<CONNECTION : Connection>(logger: KLogger,
|
|||
suspendResult = null
|
||||
} else if (suspendResult is Exception) {
|
||||
RmiUtils.cleanStackTraceForImpl(suspendResult, true)
|
||||
|
||||
val fancyName = RmiUtils.makeFancyMethodName(cachedMethod)
|
||||
val exception = Exception("Error invoking method: $fancyName", suspendResult)
|
||||
RmiUtils.cleanStackTraceForImpl(exception, true)
|
||||
|
||||
endPoint.listenerManager.notifyError(connection, exception)
|
||||
endPoint.listenerManager.notifyError(connection, suspendResult)
|
||||
}
|
||||
|
||||
if (sendResponse) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user