From: Andrew Skiba Date: Tue, 7 Nov 2006 10:23:40 +0000 (-0000) Subject: fallback for serialization problems X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=9bc1e374d0d0c05c5d6cf2caf322fb93cb1430d5;p=mono.git fallback for serialization problems svn path=/trunk/mcs/; revision=67442 --- diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/MyHost.jvm.cs b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/MyHost.jvm.cs index 567a629453b..b4239c63ae5 100644 --- a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/MyHost.jvm.cs +++ b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/MyHost.jvm.cs @@ -33,7 +33,16 @@ namespace MonoTests.SystemWeb.Framework return string.Empty; using (MemoryStream ms = new MemoryStream ()) { SoapFormatter f = new SoapFormatter (); - f.Serialize (ms, o); + try { + f.Serialize (ms, o); + } + catch (Exception ex) { + Exception inner = o as Exception; + if (inner != null) + RethrowException (inner); + else + throw; + } return HttpUtility.UrlEncode (ms.ToArray()); } }