소스 검색

[core] feat: more info at handlePipelineException (#2796)

* feat: more info at handlePipelineException

* fix: info style for reviewed
cssxsh 1 년 전
부모
커밋
d62c613b5f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      mirai-core/src/jvmBaseMain/kotlin/network/impl/netty/NettyNetworkHandler.kt

+ 1 - 1
mirai-core/src/jvmBaseMain/kotlin/network/impl/netty/NettyNetworkHandler.kt

@@ -43,7 +43,7 @@ internal open class NettyNetworkHandler(
     ///////////////////////////////////////////////////////////////////////////
     ///////////////////////////////////////////////////////////////////////////
 
 
     protected open fun handlePipelineException(ctx: ChannelHandlerContext, error: Throwable) {
     protected open fun handlePipelineException(ctx: ChannelHandlerContext, error: Throwable) {
-        setState { StateClosed(NettyChannelException(cause = error)) }
+        setState { StateClosed(NettyChannelException(cause = error, message = "An unexpected exception was received from netty pipeline. (context=$context, address=$address)")) }
     }
     }
 
 
     ///////////////////////////////////////////////////////////////////////////
     ///////////////////////////////////////////////////////////////////////////