Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the custom exception types serializable #369

Merged
merged 2 commits into from Aug 8, 2019

Conversation

@Numpsy
Copy link
Contributor

commented Aug 1, 2019

refs #365 :

-Mark the custom exception types as Serializable
-Add the constructor overloads needed for deserialization
-Add unit tests for (de)serialization

I certify that I own, and have sufficient rights to contribute, all source code and related material intended to be compiled or integrated with the source code for the SharpZipLib open source product (the "Contribution"). My Contribution is licensed under the MIT License.

@Numpsy Numpsy force-pushed the Numpsy:rw/365 branch from 2e5dfeb to b0e0329 Aug 2, 2019

@piksel
piksel approved these changes Aug 5, 2019
Copy link
Collaborator

left a comment

The tests may be reduced a bit, but it's not necessary. I'm OK with merging this either way.

/// The System.Runtime.Serialization.StreamingContext that contains contextual information
/// about the source or destination.
/// </param>
protected SharpZipBaseException(SerializationInfo info, StreamingContext context)

This comment has been minimized.

Copy link
@piksel

piksel Aug 5, 2019

Collaborator

This was actually needed since we're inheriting from Exception (which implements ISerializable). But at least we can just chain the base constructor.

@Numpsy Numpsy referenced this pull request Aug 6, 2019

@Numpsy Numpsy force-pushed the Numpsy:rw/365 branch from b0e0329 to 790a649 Aug 6, 2019

@piksel
piksel approved these changes Aug 8, 2019

@piksel piksel merged commit 36ece7a into icsharpcode:master Aug 8, 2019

1 check passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@Numpsy Numpsy deleted the Numpsy:rw/365 branch Aug 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.