In the next build, this has been tweaked:
type = source.DeserializeType(typeName);
if(type == null)
{
throw new ProtoException("Unable to
resolve type: " + typeName);
}
So, this should be resolved from then.
Thanks for the (very valid) suggestion,
Marc
On Oct 11, 9:38 am, Lex <[email protected]> wrote:
> Hi,
>
> We have recently started using protobuf-net for some serialization
> tasks that we have. Our particular problem is that our serialized
> objects can live for possibly weeks at a time before we need to de-
> serialize them. In the mean time we may need to re-factor some of the
> namespaces of the nested objects in the serialized objects.
>
> After a bout of re-factoring I ran the de-serialization and got a
> 'Null reference' exception message. With no more information to work
> with I had to check the source code out and debug it to find the
> offended code. Once found I attached a handler to
> TypeModel.DynamicTypeFormatting to fix our issue which works very
> nicely.
>
> However I feel it would be very nice if we could have a better
> exception message output so it could tell me what string it was trying
> to get a type for a failed. Maybe checking the result of the call to
> model.DeserializeType in ProtoReader.DeserializeType for null and
> throwing an exception that outputs the Assembly name so that we know
> what it failed to find a type for.
>
> For your consideration,
>
> Lex
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/protobuf?hl=en.