It is for netty-4.0.0.CR5
 What are the types of the handlers in the pipeline?

When extending `ChannelInboundHandler(Adapter)`, you have to call `MessageList.releaseAllAndRecycle()` on the incoming message lists after processing them.

(some utilities for this being worked in #1446)
 Hello,

I extends ChannelInboundHandlerAdapter. I call MessageList.releaseAllAndRecycle() after processing them.

My method:

```
@Override
public void messageReceived(ChannelHandlerContext ctx, MessageList<Object> msgs) throws Exception {
    for (int i = 0; i < msgs.size(); i++) 
    {
        Object msg = msgs.get(i);

        if (msg instanceof HttpRequest) 
        {
            HttpRequest request = this.request = (HttpRequest) msg;

            // if GET Method: should not try to create a HttpPostRequestDecoder
            try {
                decoder = new HttpPostRequestDecoder(factory, request);
            } catch (ErrorDataDecoderException e1) {
                e1.printStackTrace();
                responseContent.append("RECEIVED_FAIL");
                writeResponse(ctx.channel());
                ctx.channel().close();
                return;
            } catch (IncompatibleDataDecoderException e1) {
                // GET Method: should not try to create a HttpPostRequestDecoder
                // So OK but stop here
                //responseContent.append(e1.getMessage());
                responseContent.append("RECEIVED_FAIL");
                writeResponse(ctx.channel());
                return;
            }
        }//if

        // check if the decoder was constructed before
        // if not it handles the form get
        if (decoder != null) 
        {
            if (msg instanceof HttpContent) 
            {
                // New chunk is received
                HttpContent chunk = (HttpContent) msg;
                try 
                {
                    decoder.offer(chunk);
                } 
                catch (ErrorDataDecoderException e1) 
                {
                    e1.printStackTrace();
                    responseContent.append("RECEIVED_FAIL");
                    writeResponse(ctx.channel());
                    ctx.channel().close();
                    return;
                }

                if (chunk instanceof LastHttpContent) 
                {
                    responseContent.setLength(0);
                    isReceivedOK = false;

                    readHttpDataAllReceive(ctx.channel());

                    if(isReceivedOK)
                        responseContent.append("RECEIVED_OK");
                    else
                        responseContent.append("RECEIVED_FAIL");

                    writeResponse(ctx.channel());
                    readingChunks = false;
                    reset();
                }
            }
        }//decoder
    }//for

    msgs.releaseAllAndRecycle();
}
```
 The `releaseAllAndRecycle()` is not in a finally block, and there are `return` statements in the error handling paths. Were there any exceptions handled before you got the leak?
 I have print screen from my test machine where I see only this exception. I used this example (https://github.com/netty/netty/blob/master/example/src/main/java/io/netty/example/http/upload/HttpUploadServerHandler.java) (there isn't "finally" block too). I see, you have right. I think, I must add releaseAllAndRecycle(). I'll let report if throw exception.
 Thanks @jaens!
 @rostaocenasek any news here ?
 Let us close this as its most likely a user error ... @rostaocenasek please reopen if you still think its a bug
 Hello,
I have the test server back. I tested netty. After 2 minutes what I start up the server, I see first exception:

WARN ResourceLeakDetector:151 - LEAK: ByteBuf was GC'd before being released correctly.
io.netty.util.ResourceLeakException: io.netty.buffer.DefaultCompositeByteBuf@501f2f6a
    at io.netty.util.ResourceLeakDetector$DefaultResourceLeak.<init>(ResourceLeakDetector.java:158)
    at io.netty.util.ResourceLeakDetector.open(ResourceLeakDetector.java:103)
    at io.netty.buffer.DefaultCompositeByteBuf.<init>(DefaultCompositeByteBuf.java:80)
    at io.netty.buffer.Unpooled.wrappedBuffer(Unpooled.java:301)
    at io.netty.buffer.Unpooled.wrappedBuffer(Unpooled.java:238)
    at io.netty.handler.codec.http.multipart.HttpPostRequestDecoder.offer(HttpPostRequestDecoder.java:363)
    at main.java.sportsdata.spocosy.SpocosyUploadServerHandler.messageReceived(SpocosyUploadServerHandler.java:150)
    at io.netty.channel.DefaultChannelHandlerContext.invokeMessageReceived(DefaultChannelHandlerContext.java:379)
    at io.netty.channel.DefaultChannelHandlerContext.fireMessageReceived(DefaultChannelHandlerContext.java:364)
    at io.netty.handler.codec.MessageToMessageDecoder.messageReceived(MessageToMessageDecoder.java:96)
    at io.netty.handler.codec.MessageToMessageCodec.messageReceived(MessageToMessageCodec.java:100)
    at io.netty.channel.DefaultChannelHandlerContext.invokeMessageReceived(DefaultChannelHandlerContext.java:379)
    at io.netty.channel.DefaultChannelHandlerContext.fireMessageReceived(DefaultChannelHandlerContext.java:364)
    at io.netty.handler.codec.ByteToMessageDecoder.messageReceived(ByteToMessageDecoder.java:187)
    at io.netty.channel.DefaultChannelHandlerContext.invokeMessageReceived(DefaultChannelHandlerContext.java:379)
    at io.netty.channel.DefaultChannelHandlerContext.fireMessageReceived(DefaultChannelHandlerContext.java:364)
    at io.netty.channel.DefaultChannelPipeline.fireMessageReceived(DefaultChannelPipeline.java:786)
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:120)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:489)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:464)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:358)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101)
    at java.lang.Thread.run(Thread.java:724)

After 7 minutes:

WARN ResourceLeakDetector:151 - LEAK: ByteBuf was GC'd before being released correctly.
io.netty.util.ResourceLeakException: io.netty.buffer.DefaultCompositeByteBuf@3a1c5252
    at io.netty.util.ResourceLeakDetector$DefaultResourceLeak.<init>(ResourceLeakDetector.java:158)
    at io.netty.util.ResourceLeakDetector.open(ResourceLeakDetector.java:103)
    at io.netty.buffer.DefaultCompositeByteBuf.<init>(DefaultCompositeByteBuf.java:60)
    at io.netty.buffer.Unpooled.compositeBuffer(Unpooled.java:353)
    at io.netty.buffer.Unpooled.compositeBuffer(Unpooled.java:346)
    at io.netty.handler.codec.http.multipart.AbstractMemoryHttpData.addContent(AbstractMemoryHttpData.java:100)
    at io.netty.handler.codec.http.multipart.MixedFileUpload.addContent(MixedFileUpload.java:67)
    at io.netty.handler.codec.http.multipart.HttpPostRequestDecoder.readFileUploadByteMultipart(HttpPostRequestDecoder.java:1698)
    at io.netty.handler.codec.http.multipart.HttpPostRequestDecoder.getFileUpload(HttpPostRequestDecoder.java:1149)
    at io.netty.handler.codec.http.multipart.HttpPostRequestDecoder.decodeMultipart(HttpPostRequestDecoder.java:817)
    at io.netty.handler.codec.http.multipart.HttpPostRequestDecoder.parseBodyMultipart(HttpPostRequestDecoder.java:725)
    at io.netty.handler.codec.http.multipart.HttpPostRequestDecoder.parseBody(HttpPostRequestDecoder.java:423)
    at io.netty.handler.codec.http.multipart.HttpPostRequestDecoder.offer(HttpPostRequestDecoder.java:368)
    at main.java.sportsdata.spocosy.SpocosyUploadServerHandler.messageReceived(SpocosyUploadServerHandler.java:150)
    at io.netty.channel.DefaultChannelHandlerContext.invokeMessageReceived(DefaultChannelHandlerContext.java:379)
    at io.netty.channel.DefaultChannelHandlerContext.fireMessageReceived(DefaultChannelHandlerContext.java:364)
    at io.netty.handler.codec.MessageToMessageDecoder.messageReceived(MessageToMessageDecoder.java:96)
    at io.netty.handler.codec.MessageToMessageCodec.messageReceived(MessageToMessageCodec.java:100)
    at io.netty.channel.DefaultChannelHandlerContext.invokeMessageReceived(DefaultChannelHandlerContext.java:379)
    at io.netty.channel.DefaultChannelHandlerContext.fireMessageReceived(DefaultChannelHandlerContext.java:364)
    at io.netty.handler.codec.ByteToMessageDecoder.messageReceived(ByteToMessageDecoder.java:187)
    at io.netty.channel.DefaultChannelHandlerContext.invokeMessageReceived(DefaultChannelHandlerContext.java:379)
    at io.netty.channel.DefaultChannelHandlerContext.fireMessageReceived(DefaultChannelHandlerContext.java:364)
    at io.netty.channel.DefaultChannelPipeline.fireMessageReceived(DefaultChannelPipeline.java:786)
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:120)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:489)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:464)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:358)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101)
    at java.lang.Thread.run(Thread.java:724)
 @rostaocenasek I think I just fixed it today in master... could you please verify ?
 I have problem build project from master :(.
 whats the problem ? It builds here without problems…

Am 04.07.2013 um 15:46 schrieb Rostislav Ocenasek notifications@github.com:

> I have problem build project from master :(.
> 
> —
> Reply to this email directly or view it on GitHub.
 Builded netty-all-4.0.0.CR10-SNAPSHOT.jar . Tested. Still Exception:

WARN ResourceLeakDetector:151 - LEAK: ByteBuf was GC'd before being released correctly.
io.netty.util.ResourceLeakException: io.netty.buffer.DefaultCompositeByteBuf@445551c5
    at io.netty.util.ResourceLeakDetector$DefaultResourceLeak.<init>(ResourceLeakDetector.java:158)
    at io.netty.util.ResourceLeakDetector.open(ResourceLeakDetector.java:103)
    at io.netty.buffer.DefaultCompositeByteBuf.<init>(DefaultCompositeByteBuf.java:80)
    at io.netty.buffer.Unpooled.wrappedBuffer(Unpooled.java:301)
    at io.netty.buffer.Unpooled.wrappedBuffer(Unpooled.java:238)
    at io.netty.handler.codec.http.multipart.HttpPostRequestDecoder.offer(HttpPostRequestDecoder.java:363)
    at main.java.sportsdata.spocosy.SpocosyUploadServerHandler.messageReceived(SpocosyUploadServerHandler.java:150)
    at io.netty.channel.DefaultChannelHandlerContext.invokeMessageReceived(DefaultChannelHandlerContext.java:379)
    at io.netty.channel.DefaultChannelHandlerContext.fireMessageReceived(DefaultChannelHandlerContext.java:364)
    at io.netty.handler.codec.MessageToMessageDecoder.messageReceived(MessageToMessageDecoder.java:96)
    at io.netty.handler.codec.MessageToMessageCodec.messageReceived(MessageToMessageCodec.java:100)
    at io.netty.channel.DefaultChannelHandlerContext.invokeMessageReceived(DefaultChannelHandlerContext.java:379)
    at io.netty.channel.DefaultChannelHandlerContext.fireMessageReceived(DefaultChannelHandlerContext.java:364)
    at io.netty.handler.codec.ByteToMessageDecoder.messageReceived(ByteToMessageDecoder.java:187)
    at io.netty.channel.DefaultChannelHandlerContext.invokeMessageReceived(DefaultChannelHandlerContext.java:379)
    at io.netty.channel.DefaultChannelHandlerContext.fireMessageReceived(DefaultChannelHandlerContext.java:364)
    at io.netty.channel.DefaultChannelPipeline.fireMessageReceived(DefaultChannelPipeline.java:786)
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:120)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:489)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:464)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:358)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101)
    at java.lang.Thread.run(Thread.java:724)
 Can you share your full code ao Ican reproduce?

Am 04.07.2013 um 16:35 schrieb Rostislav Ocenasek notifications@github.com:

> Builded. Tested. Still Exception:
> 
> WARN ResourceLeakDetector:151 - LEAK: ByteBuf was GC'd before being released correctly.
> io.netty.util.ResourceLeakException: io.netty.buffer.DefaultCompositeByteBuf@445551c
> at io.netty.util.ResourceLeakDetector$DefaultResourceLeak.(ResourceLeakDetector.java:158)
> at io.netty.util.ResourceLeakDetector.open(ResourceLeakDetector.java:103)
> at io.netty.buffer.DefaultCompositeByteBuf.(DefaultCompositeByteBuf.java:80)
> at io.netty.buffer.Unpooled.wrappedBuffer(Unpooled.java:301)
> at io.netty.buffer.Unpooled.wrappedBuffer(Unpooled.java:238)
> at io.netty.handler.codec.http.multipart.HttpPostRequestDecoder.offer(HttpPostRequestDecoder.java:363)
> at main.java.sportsdata.spocosy.SpocosyUploadServerHandler.messageReceived(SpocosyUploadServerHandler.java:150)
> at io.netty.channel.DefaultChannelHandlerContext.invokeMessageReceived(DefaultChannelHandlerContext.java:379)
> at io.netty.channel.DefaultChannelHandlerContext.fireMessageReceived(DefaultChannelHandlerContext.java:364)
> at io.netty.handler.codec.MessageToMessageDecoder.messageReceived(MessageToMessageDecoder.java:96)
> at io.netty.handler.codec.MessageToMessageCodec.messageReceived(MessageToMessageCodec.java:100)
> at io.netty.channel.DefaultChannelHandlerContext.invokeMessageReceived(DefaultChannelHandlerContext.java:379)
> at io.netty.channel.DefaultChannelHandlerContext.fireMessageReceived(DefaultChannelHandlerContext.java:364)
> at io.netty.handler.codec.ByteToMessageDecoder.messageReceived(ByteToMessageDecoder.java:187)
> at io.netty.channel.DefaultChannelHandlerContext.invokeMessageReceived(DefaultChannelHandlerContext.java:379)
> at io.netty.channel.DefaultChannelHandlerContext.fireMessageReceived(DefaultChannelHandlerContext.java:364)
> at io.netty.channel.DefaultChannelPipeline.fireMessageReceived(DefaultChannelPipeline.java:786)
> at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:120)
> at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:489)
> at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:464)
> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:358)
> at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101)
> at java.lang.Thread.run(Thread.java:724)
> 
> —
> Reply to this email directly or view it on GitHub.
 I sent you mail.
 Let me check tomorrow..

Am 04.07.2013 um 19:34 schrieb Rostislav Ocenasek notifications@github.com:

> I sent you mail.
> 
> —
> Reply to this email directly or view it on GitHub.
 @rostaocenasek it seems like you not release all resources. Check again the example provided by netty which does exactly this.
 Hello,

I repair code according to your example and use today build of netty. Still I see Exception:

15:16:09,642  WARN ResourceLeakDetector:151 - LEAK: ByteBuf was GC'd before being released correctly.
io.netty.util.ResourceLeakException: io.netty.buffer.DefaultCompositeByteBuf@7dfcc4fc
    at io.netty.util.ResourceLeakDetector$DefaultResourceLeak.<init>(ResourceLeakDetector.java:158)
    at io.netty.util.ResourceLeakDetector.open(ResourceLeakDetector.java:103)
    at io.netty.buffer.DefaultCompositeByteBuf.<init>(DefaultCompositeByteBuf.java:80)
    at io.netty.buffer.Unpooled.wrappedBuffer(Unpooled.java:301)
    at io.netty.buffer.Unpooled.wrappedBuffer(Unpooled.java:238)
    at io.netty.handler.codec.http.multipart.HttpPostRequestDecoder.offer(HttpPostRequestDecoder.java:382)
    at main.java.sportsdata.spocosy.SpocosyUploadServerHandler.messageReceived(SpocosyUploadServerHandler.java:155)
    at main.java.sportsdata.spocosy.SpocosyUploadServerHandler.messageReceived(SpocosyUploadServerHandler.java:1)
    at io.netty.channel.SimpleChannelInboundHandler.messageReceived(SimpleChannelInboundHandler.java:84)
    at io.netty.channel.DefaultChannelHandlerContext.invokeMessageReceived(DefaultChannelHandlerContext.java:379)
    at io.netty.channel.DefaultChannelHandlerContext.fireMessageReceived(DefaultChannelHandlerContext.java:364)
    at io.netty.handler.codec.MessageToMessageDecoder.messageReceived(MessageToMessageDecoder.java:96)
    at io.netty.handler.codec.MessageToMessageCodec.messageReceived(MessageToMessageCodec.java:100)
    at io.netty.channel.DefaultChannelHandlerContext.invokeMessageReceived(DefaultChannelHandlerContext.java:379)
    at io.netty.channel.DefaultChannelHandlerContext.fireMessageReceived(DefaultChannelHandlerContext.java:364)
    at io.netty.handler.codec.ByteToMessageDecoder.messageReceived(ByteToMessageDecoder.java:187)
    at io.netty.channel.DefaultChannelHandlerContext.invokeMessageReceived(DefaultChannelHandlerContext.java:379)
    at io.netty.channel.DefaultChannelHandlerContext.fireMessageReceived(DefaultChannelHandlerContext.java:364)
    at io.netty.channel.DefaultChannelPipeline.fireMessageReceived(DefaultChannelPipeline.java:786)
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:120)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:497)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:465)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:359)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101)
    at java.lang.Thread.run(Thread.java:724)
 I also see the Exception for 4.0.0.CR10-SNAPSHOT/netty-all-4.0.0.CR10-20130709, why? is a bug or has fixed?
 I don't know, but sometimes I see this exception 5 min start server after, sometimes 6-10 hours after.

io.netty.util.ResourceLeakDetector reportLeak
```
Jun 18, 2013 7:05:31 PM io.netty.util.ResourceLeakDetector reportLeak
WARNING: LEAK: ByteBuf was GC'd before being released correctly.
io.netty.util.ResourceLeakException: io.netty.buffer.DefaultCompositeByteBuf@32f5627f
       at io.netty.util.ResourceLeakDetector$DefaultResourceLeak.<init>(ResourceLeakDetector.java:158)
       at io.netty.util.ResourceLeakDetector.open(ResourceLeakDetector.java:103)
       at io.netty.buffer.DefaultCompositeByteBuf.<init>(DefaultCompositeByteBuf.java:80)
       at io.netty.buffer.Unpooled.wrappedBuffer(Unpooled.java:301)
       at io.netty.buffer.Unpooled.wrappedBuffer(Unpooled.java:238)
       at io.netty.handler.codec.http.multipart.AbstractMemoryHttpData.addContent(AbstractMemoryHttpData.java:95)
       at io.netty.handler.codec.http.multipart.MemoryAttribute.addContent(MemoryAttribute.java:69)
       at io.netty.handler.codec.http.multipart.MixedAttribute.addContent(MixedAttribute.java:73)
       at io.netty.handler.codec.http.multipart.HttpPostRequestDecoder.loadFieldMultipartStandard(HttpPostRequestDecoder.java:1792)
       at io.netty.handler.codec.http.multipart.HttpPostRequestDecoder.loadFieldMultipart(HttpPostRequestDecoder.java:1826)
       at io.netty.handler.codec.http.multipart.HttpPostRequestDecoder.decodeMultipart(HttpPostRequestDecoder.java:804)
       at io.netty.handler.codec.http.multipart.HttpPostRequestDecoder.parseBodyMultipart(HttpPostRequestDecoder.java:725)
       at io.netty.handler.codec.http.multipart.HttpPostRequestDecoder.parseBody(HttpPostRequestDecoder.java:423)
       at 
io.netty.handler.codec.http.multipart.HttpPostRequestDecoder.offer(HttpPostRequestDecoder.java:368)
       at com.sportsdata.spocosy.server.HttpUploadServerHandler.messageReceived(HttpUploadServerHandler.java:198)
       at io.netty.channel.DefaultChannelHandlerContext.invokeMessageReceived(DefaultChannelHandlerContext.java:379)
       at io.netty.channel.DefaultChannelHandlerContext.fireMessageReceived(DefaultChannelHandlerContext.java:364)
       at io.netty.handler.codec.MessageToMessageDecoder.messageReceived(MessageToMessageDecoder.java:96)
       at io.netty.handler.codec.MessageToMessageCodec.messageReceived(MessageToMessageCodec.java:100)
       at io.netty.channel.DefaultChannelHandlerContext.invokeMessageReceived(DefaultChannelHandlerContext.java:379)
       at io.netty.channel.DefaultChannelHandlerContext.fireMessageReceived(DefaultChannelHandlerContext.java:364)
       at io.netty.handler.codec.ByteToMessageDecoder.messageReceived(ByteToMessageDecoder.java:178)
       at io.netty.channel.DefaultChannelHandlerContext.invokeMessageReceived(DefaultChannelHandlerContext.java:379)
       at io.netty.channel.DefaultChannelHandlerContext.fireMessageReceived(DefaultChannelHandlerContext.java:364)
       at io.netty.channel.DefaultChannelHandlerContext.fireMessageReceived(DefaultChannelHandlerContext.java:347)
       at io.netty.channel.DefaultChannelPipeline.fireMessageReceived(DefaultChannelPipeline.java:780)
       at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:92)
       at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:489)
       at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:464)
       at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:358)
       at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101)
       at java.lang.Thread.run(Thread.java:722)
```

common/src/main/java/io/netty/util/ResourceLeakException.java
common/src/main/java/io/netty/util/ResourceLeakException.java
diff --git a/common/src/main/java/io/netty/util/ResourceLeakException.java b/common/src/main/java/io/netty/util/ResourceLeakException.java
index a69238884bf..d1bdec0c4ff 100644
--- a/common/src/main/java/io/netty/util/ResourceLeakException.java
+++ b/common/src/main/java/io/netty/util/ResourceLeakException.java
@@ -16,6 +16,8 @@
 
 package io.netty.util;
 
+import io.netty.util.internal.StringUtil;
+
 import java.util.Arrays;
 
 public class ResourceLeakException extends RuntimeException {
@@ -64,4 +66,15 @@ public boolean equals(Object o) {
 
         return Arrays.equals(cachedStackTrace, ((ResourceLeakException) o).cachedStackTrace);
     }
+
+    @Override
+    public String toString() {
+        final StringBuilder builder = new StringBuilder();
+        builder.append(this.getClass().getCanonicalName()).append(": ").append(getMessage());
+        for (StackTraceElement element : cachedStackTrace) {
+          builder.append(StringUtil.NEWLINE).append("  at ").append(element);
+        }
+
+        return builder.toString();
+    }
 }
