ソースを参照

2004-09-22 Zoltan Varga <[email protected]>

	* Module.cs: Implement net 2.0 ResolveXXX methods.

	* Module.cs (resolve_token_exception): Fix type of exception thrown.

svn path=/trunk/mcs/; revision=34213
Zoltan Varga 21 年 前
コミット
76f99d3526

+ 2 - 0
mcs/class/corlib/System.Reflection/ChangeLog

@@ -2,6 +2,8 @@
 
 	* Module.cs: Implement net 2.0 ResolveXXX methods.
 
+	* Module.cs (resolve_token_exception): Fix type of exception thrown.
+
 2004-09-21  Martin Baulig  <[email protected]>
 
 	* Assembly.cs (MonoDebugger_CheckRuntimeVersion): New internal method.

+ 2 - 2
mcs/class/corlib/System.Reflection/Module.cs

@@ -248,9 +248,9 @@ namespace System.Reflection {
 #if NET_2_0
 		private Exception resolve_token_exception (int metadataToken, ResolveTokenError error, string tokenType) {
 			if (error == ResolveTokenError.OutOfRange)
-				return new ArgumentOutOfRangeException (String.Format ("Token 0x{0:x} is not valid in the scope of module {1}", metadataToken, name), "metadataToken");
+				return new ArgumentOutOfRangeException ("metadataToken", String.Format ("Token 0x{0:x} is not valid in the scope of module {1}", metadataToken, name));
 			else
-				return new ArgumentOutOfRangeException (String.Format ("Token 0x{0:x} is not a valid {1} token in the scope of module {2}", metadataToken, tokenType, name), "metadataToken");
+				return new ArgumentException (String.Format ("Token 0x{0:x} is not a valid {1} token in the scope of module {2}", metadataToken, tokenType, name), "metadataToken");
 		}
 
 		public FieldInfo ResolveField (int metadataToken) {