Merge #24 break when an exception is not serializable
MrJingle opened this issue · 2 comments
MrJingle commented
Hi,
in the latest version (3.5.2) of autofac, to support the PCL the author(Nicholas Blumhardt) removed the SerializableAttribute(and the associated constructor) from the DependecyResolutionException class.
(autofac/Autofac@1db4ee4, file Core/Source/Autofac/Core/DependencyResolutionException.cs)
The merge [https://github.com//pull/24] will cause Clap to fail when trying to serialize such exception.
There should be some conditional checking and maybe a fallback on the old behavior if the exception is not serializable.
Thanks,
MrJingle
adrianaisemberg commented
As a quick workaround, I suggest wrapping this line:
PreserveStackTrace(tex.InnerException);
With an empty try-catch
adrianaisemberg commented
Committed. Nugetted.