I’m just saving this here for future reference: here’s an example of a serializable exception in C#:
Some things of note:
[Serializable]
attributeXmlValidationException(SerializationInfo, StreamingContext)
GetObjectData(SerializationInfo, StreamingContext)
Also included is a battery of unit tests to verify that the class really does serialize and deserialize itself properly:
Content © 2024 Richard Cook. All rights reserved.