> You don't need a grow buffer

If recursion is involved, the stack traces can be very long. I don't see an alternative, except formatting the Throwable twice and measuring its size on the first run.

> this doubles what a normal realloc implementation does

I don't see how.

> and this code is also not performance sensitive.

It doesn't need to be.

Thank you for the criticism, but do you have any suggestions on how to improve the implementation?