Make Exceptions Serializable
See original GitHub issueDescription
Currently AssertFailedException
, AssertInconclusiveException
, InternalTestFailureException
, and UnitTestException
are not marked serializable.
This presents a problem when executing tests in an different AppDomain. Since the exceptions are not serializable the runtime can’t move them between app domains and throws SerializationException.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:8 (6 by maintainers)
Top Results From Across the Web
What is the correct way to make a custom .NET Exception ...
Complete implementation of a custom serializable exception ... Override GetObjectData() and make sure you call through to base.
Read more >The Art of .NET Custom Exceptions | by bytedev - Medium
Custom exceptions are not serializable by default. But making a custom exception serializable allows it to be properly marshalled across app domains and...
Read more >How to create user-defined exceptions with localized ...
To create a custom exception, follow these steps: Create a serializable class that inherits from Exception. The class name should end in ...
Read more >How to Serialize Exceptions as JSON in .NET
Demonstrate how to serialize exceptions in .NET with elaborate explanation, guidelines and practical examples.
Read more >Make Exception Classes Serializable
Mark the exception type with the [Serializable] attribute. · Add an empty protected serialization constructor that simply delegates to the base ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Haplois The effort is minimal so that’s probably still worth implementing it even if we know that app domains are no longer a thing for .net core.
We need a bit of investigation but maybe we will have to wait for the v3 as
SerializableAttribute
isn’t available in portable class libs.