I am trying to serialize an Exception object in C#. However, it appears that it is impossible since the Exception class is not marked as [Serializable]. Is there a way to work around that?
If something goes wrong during the execution of the application, I want to be informed with the exception that occurred.
My first reflex is to serialize it.
What I’ve done before is create a custom Error class. This encapsulates all the relevant information about an Exception and is XML serializable.