Log exception for association failure (#25438)
There have been cases where the thrown NettyTransportExceptionNoStackTrace contains no cause and a message that doesn't indicate what type of exception has been thrown when establishing a connection.
This commit is contained in:
parent
131e6d10d6
commit
a0e79a0542
1 changed files with 2 additions and 2 deletions
|
|
@ -527,7 +527,7 @@ class NettyTransport(val settings: NettyTransportSettings, val system: ExtendedA
|
||||||
else
|
else
|
||||||
readyChannel.getPipeline.get(classOf[ClientHandler]).statusFuture
|
readyChannel.getPipeline.get(classOf[ClientHandler]).statusFuture
|
||||||
} yield handle) recover {
|
} yield handle) recover {
|
||||||
case c: CancellationException ⇒ throw new NettyTransportExceptionNoStack("Connection was cancelled")
|
case _: CancellationException ⇒ throw new NettyTransportExceptionNoStack("Connection was cancelled")
|
||||||
case NonFatal(t) ⇒
|
case NonFatal(t) ⇒
|
||||||
val msg =
|
val msg =
|
||||||
if (t.getCause == null)
|
if (t.getCause == null)
|
||||||
|
|
@ -536,7 +536,7 @@ class NettyTransport(val settings: NettyTransportSettings, val system: ExtendedA
|
||||||
s"${t.getMessage}, caused by: ${t.getCause}"
|
s"${t.getMessage}, caused by: ${t.getCause}"
|
||||||
else
|
else
|
||||||
s"${t.getMessage}, caused by: ${t.getCause}, caused by: ${t.getCause.getCause}"
|
s"${t.getMessage}, caused by: ${t.getCause}, caused by: ${t.getCause.getCause}"
|
||||||
throw new NettyTransportExceptionNoStack(msg, t.getCause)
|
throw new NettyTransportExceptionNoStack(s"${t.getClass.getName}: $msg", t.getCause)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue