Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 553 by [email protected]: Protobuf for java: Exception Handling in 2.5.0 is broken
http://code.google.com/p/protobuf/issues/detail?id=553

Migration from 2.4.x to 2.5.0 is impossible because the Exception handling is broken.

In 2.5.0 it is impossible to determine the exact cause of a parsing exeption (for example a socket closed exeption, or file access exeption) because the thrown InvalidProtocolBufferException does not contain the cause of the exception itself.

The cause is the throwable that caused the InvalidProtocolBufferException to get thrown (for example an instance of SocketException).

The current implementation only contains the textual error description of the cause and not the throwable itself.



Solution:

1. Extend the InvalidProtocolBufferException constructor to be able to add the cause.

2. Change implementation of the protobuf compiler so that the generated java classes always add the throwable that caused the InvalidProtocolBufferException to get thrown before the InvalidProtocolBufferException is thrown.

3. Change the implementation of the java library so that all classes add the throwable that caused a InvalidProtocolBufferException to get thrown before the InvalidProtocolBufferException is thrown.

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to