I've recently updated 1 logging component to log Exception.ToString rather than Exception.Message.ToString(), the problem I have with exceptions now are the following:
- Exception.ToString() contain line breaks and
- Can contain a tab character that I am splitting on
- Could cause other potential hurdles at run time, that I might not have thought of, so the logging and retrieval becomes subject to data.
What I need is a reliable way to store and retrieve these errors in a text file, in such a way as to preserve the original error.toString as much as possible. Along side the error I store 3 other fields - previously when using exception.message.toString I was using a | character as a seperator character, but now since the error is longer than 1 line, the code fails.
Any help would be welcomed, Thanks