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

Markus Mauhart qwe123 at chello.at
Sat May 6 12:25:45 EDT 2006


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).


--- 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

                        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.");

More information about the Mono-devel-list mailing list