[Mono-dev] ObjectDisposedException etc lacks #ctor(String, Exception)
Andy Hume
andyhume32 at yahoo.co.uk
Wed Dec 20 05:40:46 EST 2006
Robert Jordan wrote:
> Andy Hume wrote:
> > I was using
> > new ObjectDisposedException("...", caughtException) in my code,
> > and thus on Mono it fails at runtime with
> MissingMethodException as that exception has no "#ctor(string
> message, Exception inner)" in Mono.
>
> These missing bits are already on the class status report:
[...]
> Instead of writing you own tools you might have a look at MoMa:
>
Ahh yes, woops. Oh well, I learned some more about using Reflection
anyway. :-,)
I fixed the remaining corlib ones (including fixing the HResults in
all). The remaining XxxxException omission listed was
InvalidCastException.ctor(System.String, System.Int32). MSDN says:
"This constructor supplies an HRESULT value that is accessible to
inheritors of the InvalidCastException class, via the protected HResult
property of the Exception class." I added that method too, setting the
HResult property from the Int32 argument.
I attach a patch for all that. A caveat though, as I expect setting up
the build environment may take me some time on my Windows box, I added
all the corlib files into a Visual Studio project and compiled it
there... So no further testing could be done... Don't know whether
that's of any use, or just hassle. :-,(
I'll have a further look at Moma, I'd run it previously against my code
base and it had reported that constructor omission, and VB.NET Forms
things in my code samples. The next release of my OBEX library
(Brecham.Obex at http://32feet.NET) will support Mono use across all
functions (it works mostly in the last release), with the only
behavioural difference now being the wrong exception resulting from
http://bugzilla.ximian.com/show_bug.cgi?id=80231 (resolved). The
32feet.NET library itself, which provides IrDA and Bluetooth sockets
support, may require more extensive work... But I'm sure we can provide
helpful input. :-)
Andy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: System.diff
Type: application/octet-stream
Size: 3877 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20061220/c62c2d3d/attachment.obj
More information about the Mono-devel-list
mailing list