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 Autofac exceptions serializable #456

Closed
alexmg opened this issue Jan 22, 2014 · 3 comments
Closed

Make Autofac exceptions serializable #456

alexmg opened this issue Jan 22, 2014 · 3 comments

Comments

@alexmg
Copy link
Member

alexmg commented Jan 22, 2014

From david.r...@fusonic.net on September 10, 2013 21:10:59

Make all Autofac exceptions (e.x. DependencyResolutionException) serializable so that it is possible to serialize them across app domains.

Original issue: http://code.google.com/p/autofac/issues/detail?id=456

@alexmg
Copy link
Member Author

alexmg commented Jan 22, 2014

From travis.illig on September 10, 2013 16:37:46

Autofac is now a portable class library to support multiple platforms simultaneously. Unfortunately, PCL doesn't support [Serializaable] or exception/binary serialization like that.

This is a pretty common question about PCL and custom exceptions. Here's an example question from StackOverflow. http://stackoverflow.com/questions/13604713/implementing-custom-exceptions-in-a-portable-class-library What it boils down to is that there's not really anything we can do about it. There's no current plan to revert back and create platform-specific targeted versions of Autofac (we went PCL to avoid that), which is the only solution to the issue.

What you can do on your end if you need to receive exceptions across AppDomains is to add exception handling in the AppDomain that will catch the Autofac exception(s) and marshal them across the boundary as a different exception type of your choosing.

Status: WontFix
Labels: Module-Core

@alexmg
Copy link
Member Author

alexmg commented Jan 22, 2014

From travis.illig on September 10, 2013 16:39:25

Here's the "official" response on this from the PCL team: http://pclcontrib.codeplex.com/discussions/387791

@alexmg
Copy link
Member Author

alexmg commented Jan 22, 2014

From david.r...@fusonic.net on September 10, 2013 22:34:24

Well to be specific, what I really want is to serialize the exception to filesystem via the BinaryFormatter class.

But since there is no PCL support we will have to handle these exceptions separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant