Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
diff options
context:
space:
mode:
authorZoltan Varga <vargaz@gmail.com>2016-11-03 04:27:26 +0300
committerZoltan Varga <vargaz@gmail.com>2016-11-03 05:58:27 +0300
commit241c64c46f0999c9c8dade69dc4808f069e870ff (patch)
tree7e31590a4a04b16dc458a5913ac4ed83808b2442 /mcs
parentf2448c8a85d1ec464c61a3c73459bb8f94e3fce1 (diff)
[runtime] Fix the exception message to include the proper type name and calling assembly when Type.GetType () fails. Fix some warnings. (#3876)
Diffstat (limited to 'mcs')
-rw-r--r--mcs/class/corlib/Test/System/TypeTest.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/mcs/class/corlib/Test/System/TypeTest.cs b/mcs/class/corlib/Test/System/TypeTest.cs
index 1e38f069af2..d9eea5672d5 100644
--- a/mcs/class/corlib/Test/System/TypeTest.cs
+++ b/mcs/class/corlib/Test/System/TypeTest.cs
@@ -4190,6 +4190,17 @@ namespace MonoTests.System
MustTLE (string.Format ("{0}ZZZZ,{1}", typeof (MyRealEnum).FullName, aqn));
}
+ [Test]
+ public void GetTypeExceptionMsg () {
+ string typeName = "system.int32, foo";
+ try {
+ Type.GetType(typeName, true, false);
+ } catch (TypeLoadException ex) {
+ Assert.IsTrue (ex.Message.Contains ("system.int32"));
+ Assert.IsTrue (ex.Message.Contains ("foo"));
+ }
+ }
+
delegate void MyAction<in T>(T ag);
[Test] //bug #668506