Author: gert
Date: 2008-02-10 08:24:12 -0500 (Sun, 10 Feb 2008)
New Revision: 95374

Modified:
   trunk/mcs/class/System.Web/System.Web/ChangeLog
   trunk/mcs/class/System.Web/System.Web/HttpException.cs
Log:
* HttpException.cs: Avoid IndexOutOfRangeException when there are no
error lines.


Modified: trunk/mcs/class/System.Web/System.Web/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web/ChangeLog     2008-02-10 13:24:06 UTC 
(rev 95373)
+++ trunk/mcs/class/System.Web/System.Web/ChangeLog     2008-02-10 13:24:12 UTC 
(rev 95374)
@@ -1,3 +1,8 @@
+2008-02-10  Gert Driesen  <[EMAIL PROTECTED]>
+
+       * HttpException.cs: Avoid IndexOutOfRangeException when there are no
+       error lines.
+
 2008-02-07  Gert Driesen  <[EMAIL PROTECTED]>
 
        * HttpException.cs: Removed CWL.

Modified: trunk/mcs/class/System.Web/System.Web/HttpException.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/HttpException.cs      2008-02-10 
13:24:06 UTC (rev 95373)
+++ trunk/mcs/class/System.Web/System.Web/HttpException.cs      2008-02-10 
13:24:12 UTC (rev 95374)
@@ -357,8 +357,8 @@
                                        builder.Append (exc.SourceFile);
                                else
                                        builder.Append (exc.FileName);
-                               
-                               if (isParseException || isCompileException) {
+
+                               if ((isParseException || isCompileException) && 
exc.ErrorLines.Length > 0) {
                                        builder.Append 
("&nbsp;&nbsp;<strong>Line: </strong>");
                                        builder.Append (exc.ErrorLines [0]);
                                }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to