drdk/sleipner — pull request #2 by ahem (2012-11-13 17:46:15+00:00)
Title: Improved caching of exceptions

All .NET exceptions should be serializeable (according to this: http://stackoverflow.com/questions/342528/are-all-net-exceptions-serializable) so we should be able to cache exceptions. I don't think we can always expect to get an exact copy back, as stuff like the ResponseStream on a WebException clearly can't be serialized, but as long as the type is right I think we should be okay.

Better that current affairs anyways :-)

This patch changes two things:

1) First layer of TargetInvocationExceptions are always stripped. These originate from Sleipner itself and they should be stripped for the proxy to be truly transparent.

2) Try to Cache exceptions and rethrow them, and only using the current plain "Exception stored in memcached" Exception as a fallback.