When serializing throwables, a naive approach is used. Instead, use the same mechanisms that are used to serialize other objects.