[Mono-devel-list] Raising Finer Grained Exceptions

Jason Raneses jason at raneses.com
Fri Oct 10 17:45:48 EDT 2003

I have a quick question regarding the manner in which exceptions are
thrown when developing for Mono vs. Microsoft .NET.  I am working on
porting a number of classes that document that they will only throw a
few exception types, but upon inspecting them with .NET Reflector,
they indeed can throw more than those that are documented.

In addition, I’d like to know if I am able to throw additional
exceptions as I see fit, such as InvalidArgumentException and
ArgumentOutOfRangeException, even if Microsoft’s code does not.  I
know ideally we’re trying to mirror everything in a consistent
manner, however in a lot of cases, Microsoft’s implementation is
lacking and it is hard for the anal side of me to not write something
more robust than what they’ve provided.



More information about the Mono-devel-list mailing list