[Mono-dev] (Fwd) Patch for FileStream.cs (correct exception message)

Markus Mauhart mmauhart at chello.at
Fri Dec 8 13:05:52 EST 2006


Still wrong in 1.2.2.1 ...

------- Forwarded message follows -------
To: mono-devel-list at ximian.com
Subject: Patch for FileStream.cs (correct exception message)
Date: Sat, 06 May 2006 18:25:39 +0200

Hi,


with unpatched 1.1.15 I get the following message:

    Unhandled Exception: System.ArgumentOutOfRangeException: Argument is out of range.
    Parameter name: Positive number required.

Appended the correction (which does like the other existing, correct, messages).


Regards,
Markus.



--- mono-1.1.15/mcs/class/corlib/System.IO/FileStream.cs        2006-04-14 19:50:35.000000000 +0200
+++ mono-1.1.15/mcs/class/corlib/System.IO/FileStream.patched.cs        2006-05-06 18:14:34.750000000 +0200
@@ -148,7 +148,7 @@ namespace System.IO
 #endif

                        if (bufferSize <= 0)
-                               throw new ArgumentOutOfRangeException ("Positive number required.");
+                               throw new ArgumentOutOfRangeException ("bufferSize", "Positive number required.");

                        if (mode < FileMode.CreateNew || mode > FileMode.Append)
                                throw new ArgumentOutOfRangeException ("mode", "Enum value was out of legal range.");
------- End of forwarded message -------




More information about the Mono-devel-list mailing list