Author: jonpryor
Date: 2006-01-13 10:16:23 -0500 (Fri, 13 Jan 2006)
New Revision: 55514
Modified:
trunk/mcs/class/Mono.Posix/Mono.Unix/Catalog.cs
trunk/mcs/class/Mono.Posix/Mono.Unix/ChangeLog
trunk/mcs/class/Mono.Posix/Mono.Unix/UnixMarshal.cs
Log:
* Catalog.cs, UnixMarshal.cs: Throw `UnixIOException(Native.Errno.ENOMEM)`
instead of System.OutOfMemoryException. OOME should be reserved for use
by the CLR (according to FxDG).
Modified: trunk/mcs/class/Mono.Posix/Mono.Unix/Catalog.cs
===================================================================
--- trunk/mcs/class/Mono.Posix/Mono.Unix/Catalog.cs 2006-01-13 15:16:01 UTC
(rev 55513)
+++ trunk/mcs/class/Mono.Posix/Mono.Unix/Catalog.cs 2006-01-13 15:16:23 UTC
(rev 55514)
@@ -55,11 +55,11 @@
"UTF-8", out iutf8);
try {
if (bindtextdomain (ipackage, ilocaledir) ==
IntPtr.Zero)
- throw new OutOfMemoryException
("bindtextdomain");
+ throw new UnixIOException
(Native.Errno.ENOMEM);
if (bind_textdomain_codeset (ipackage, iutf8)
== IntPtr.Zero)
- throw new OutOfMemoryException
("bind_textdomain_codeset");
+ throw new UnixIOException
(Native.Errno.ENOMEM);
if (textdomain (ipackage) == IntPtr.Zero)
- throw new OutOfMemoryException
("textdomain");
+ throw new UnixIOException
(Native.Errno.ENOMEM);
}
finally {
UnixMarshal.FreeHeap (ipackage);
Modified: trunk/mcs/class/Mono.Posix/Mono.Unix/ChangeLog
===================================================================
--- trunk/mcs/class/Mono.Posix/Mono.Unix/ChangeLog 2006-01-13 15:16:01 UTC
(rev 55513)
+++ trunk/mcs/class/Mono.Posix/Mono.Unix/ChangeLog 2006-01-13 15:16:23 UTC
(rev 55514)
@@ -1,3 +1,9 @@
+2006-01-13 Jonathan Pryor <[EMAIL PROTECTED]>
+
+ * Catalog.cs, UnixMarshal.cs: Throw
`UnixIOException(Native.Errno.ENOMEM)`
+ instead of System.OutOfMemoryException. OOME should be reserved for
use
+ by the CLR (according to FxDG).
+
2006-01-12 Jonathan Pryor <[EMAIL PROTECTED]>
* UnixPath.cs: Add ReadLink() and TryReadLink() methods.
Modified: trunk/mcs/class/Mono.Posix/Mono.Unix/UnixMarshal.cs
===================================================================
--- trunk/mcs/class/Mono.Posix/Mono.Unix/UnixMarshal.cs 2006-01-13 15:16:01 UTC
(rev 55513)
+++ trunk/mcs/class/Mono.Posix/Mono.Unix/UnixMarshal.cs 2006-01-13 15:16:23 UTC
(rev 55514)
@@ -321,7 +321,7 @@
IntPtr mem = AllocHeap (marshal.Length);
if (mem == IntPtr.Zero)
- throw new OutOfMemoryException ();
+ throw new UnixIOException (Native.Errno.ENOMEM);
bool copied = false;
try {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches