CSHARP-1013: Implement serialization of fields of custom exceptions.