Author: marek
Date: 2007-02-20 17:28:04 -0500 (Tue, 20 Feb 2007)
New Revision: 73222
Modified:
trunk/mcs/mcs/ChangeLog
trunk/mcs/mcs/class.cs
trunk/mcs/mcs/report.cs
Log:
2007-02-20 Marek Safar <[EMAIL PROTECTED]>
* class.cs, report.cs: Capture more details when things go wrong.
Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog 2007-02-20 22:26:00 UTC (rev 73221)
+++ trunk/mcs/mcs/ChangeLog 2007-02-20 22:28:04 UTC (rev 73222)
@@ -1,5 +1,9 @@
2007-02-20 Marek Safar <[EMAIL PROTECTED]>
+ * class.cs, report.cs: Capture more details when things go wrong.
+
+2007-02-20 Marek Safar <[EMAIL PROTECTED]>
+
A fix for bug #80650
* cs-parser.jay: Anonymous container starts at constructor declaration
and not at block beginning because it has to be usable in constructor
Modified: trunk/mcs/mcs/class.cs
===================================================================
--- trunk/mcs/mcs/class.cs 2007-02-20 22:26:00 UTC (rev 73221)
+++ trunk/mcs/mcs/class.cs 2007-02-20 22:28:04 UTC (rev 73222)
@@ -75,7 +75,7 @@
try {
mc.Define ();
} catch (Exception e) {
- throw new
InternalErrorException (mc.Location, mc.GetSignatureForError (), e);
+ throw new
InternalErrorException (mc, e);
}
}
}
@@ -2271,7 +2271,12 @@
bool has_compliant_args = false;
foreach (Constructor c in
instance_constructors) {
- c.Emit ();
+ try {
+ c.Emit ();
+ }
+ catch (Exception e) {
+ throw new
InternalErrorException (c, e);
+ }
if (has_compliant_args)
continue;
@@ -2281,8 +2286,14 @@
if (!has_compliant_args)
Report.Error (3015, Location, "`{0}'
has no accessible constructors which use only CLS-compliant types",
GetSignatureForError ());
} else {
- foreach (Constructor c in instance_constructors)
- c.Emit ();
+ foreach (Constructor c in
instance_constructors) {
+ try {
+ c.Emit ();
+ }
+ catch (Exception e) {
+ throw new
InternalErrorException (c, e);
+ }
+ }
}
}
Modified: trunk/mcs/mcs/report.cs
===================================================================
--- trunk/mcs/mcs/report.cs 2007-02-20 22:26:00 UTC (rev 73221)
+++ trunk/mcs/mcs/report.cs 2007-02-20 22:28:04 UTC (rev 73222)
@@ -653,8 +653,8 @@
}
public class InternalErrorException : Exception {
- public InternalErrorException (Location loc, string text,
Exception e)
- : base (loc + " " + text, e)
+ public InternalErrorException (MemberCore mc, Exception e)
+ : base (mc.Location + " " + mc.GetSignatureForError (),
e)
{
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches