+2007-02-20 Marek Safar <marek.safar@gmail.com>
+
+ * class.cs, report.cs: Capture more details when things go wrong.
+
2007-02-20 Marek Safar <marek.safar@gmail.com>
A fix for bug #80650
try {
mc.Define ();
} catch (Exception e) {
- throw new InternalErrorException (mc.Location, mc.GetSignatureForError (), e);
+ throw new InternalErrorException (mc, e);
}
}
}
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;
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);
+ }
+ }
}
}
}
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)
{
}