The original intent of this code was to avoid allocating memory in the exception handler, as it may be called on an out of memory exception.  Your changes here go against that.  Why do we need to write it to a string?