2006-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Wed, 1 Feb 2006 02:26:18 +0000 (02:26 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Wed, 1 Feb 2006 02:26:18 +0000 (02:26 -0000)
* HttpApplication.cs: keep any exception that happens during
initialization.

svn path=/trunk/mcs/; revision=56371

mcs/class/System.Web/System.Web/ChangeLog
mcs/class/System.Web/System.Web/HttpApplication.cs

index 19bd7d18d27d76f69beea1f27ecf7b3e300c418c..0d29f8e9d86612b60e234d54fcaa8029b75ac99b 100644 (file)
@@ -1,3 +1,8 @@
+2006-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * HttpApplication.cs: keep any exception that happens during
+       initialization.
+
 2006-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * HttpDataTransferMode.cs: Removed file.
index faff73006e64904e6eb237160024f4fac33d461e..10c798e84bbcfb585c70c9a246de53ae2c1a2641 100644 (file)
@@ -124,6 +124,9 @@ namespace System.Web {
                CultureInfo prev_app_culture;
                CultureInfo prev_appui_culture;
                IPrincipal prev_user;
+#if NET_2_0
+               static Exception initialization_exception;
+#endif
 
                //
                // These are used to detect the case where the EndXXX method is invoked
@@ -182,6 +185,12 @@ namespace System.Web {
                        }
                }
 
+#if NET_2_0
+               internal static Exception InitializationException {
+                       get { return initialization_exception; }
+               }
+#endif
+
                [Browsable (false)]
                [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
                public HttpApplicationState Application {
@@ -1020,6 +1029,9 @@ namespace System.Web {
                        try {
                                InitOnce (true);
                        } catch (Exception e) {
+#if NET_2_0
+                               initialization_exception = e;
+#endif
                                FinalErrorWrite (context.Response, new HttpException ("", e).GetHtmlErrorMessage ());
                                return;
                        }