title: Should an outbound handler by default pass on a ChannelPromise?
body: <p>There are very few (good) resources on best practices for how to do error handling in Netty, and my team has seen quite a few instances of errors being swallowed silently, which makes for less-than-nice debugging.</p>
  
  <p>I was simply wondering if a good default strategy is to simply pass on the promise passed into <code>write()</code> when doing your won <code>ctx.write(msg,promise)</code>?</p>
  
  <p>I wrote <a href="https://github.com/fatso83/test-driven-learning/blob/332cea2d07fc5ca47ebd568eaa8ae14f12113ef5/java-netty/src/test/java/tdl/OutHandlerBehaviourTest.java" rel="nofollow noreferrer">a bunch of "learning/exploratory"</a> tests to get a better feel for Netty's exception handling, and I found that an exception handler nearer the tail of the handler pipeline than the source of the exception would only have its promise listener called if every handler passed it on. Up until that point, we would usually just do <code>ctx.write(msg)</code>, losing the <code>ChannelPromise</code> that was sent in. Of course, should you wish to do something else and pass in another promise (<code>ctx.newPromise()</code>) you do that, but I am wondering if passing on a promise per default would make sense. </p>
  
  <p>If so, why doesn't Netty do this per default? I would think that makes sense when a caller just calls the <code>ctx.write(msg)</code> overload, as most people don't want exceptions silently dropped.</p>