Skip to content

Commit

Permalink
Merge pull request #1639 from excilys/netty_exception
Browse files Browse the repository at this point in the history
Clearer error message for exceptions happening in the Netty stack
  • Loading branch information
nremond committed Feb 9, 2014
2 parents 65cdac5 + 8edd0d0 commit 1387222
Showing 1 changed file with 4 additions and 3 deletions.
Expand Up @@ -90,9 +90,10 @@ class AsyncHandler(tx: HttpTx) extends ProgressAsyncHandler[Unit] with AsyncHand
}

def sendOnThrowable(throwable: Throwable) {
val errorMessage = Option(throwable.getMessage) match {
case Some(m) => m
case _ => throwable.getClass.getName
val className = throwable.getClass.getName
val errorMessage = throwable.getMessage match {
case null => className
case m => s"$className: $m"
}

if (logger.underlying.isInfoEnabled)
Expand Down

0 comments on commit 1387222

Please sign in to comment.