Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Allow MonoDevelop to show the 'real' message for ObjectDisposedExcept…

…ion (generator fix). Ref bug #1345
  • Loading branch information...
commit e8fa8dcafe9c51fe7a2835a06763626aee12c557 1 parent 9cc0cc5
@spouliot spouliot authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/generator.cs
View
5 src/generator.cs
@@ -2244,8 +2244,9 @@ public void Generate (Type type)
}
}
if (HasAttribute (mi, typeof (CheckDisposedAttribute))){
- print ("if ({0}.Handle == IntPtr.Zero)", RenderArgs (pars.Take (1)));
- print ("\tthrow new ObjectDisposedException (\"The object was disposed on the event, you should not call Dispose() inside the handler\");");
+ var arg = RenderArgs (pars.Take (1));
+ print ("if ({0}.Handle == IntPtr.Zero)", arg);
+ print ("\tthrow new ObjectDisposedException (\"{0}\", \"The object was disposed on the event, you should not call Dispose() inside the handler\");", arg);
}
indent--;
print ("}");
Please sign in to comment.
Something went wrong with that request. Please try again.