[sgen] catch NotSupportedException from system.xml.serialization
authorRichard Webb <webby@beardmouse.org.uk>
Wed, 24 Feb 2016 13:18:12 +0000 (13:18 +0000)
committerRichard Webb <webby@beardmouse.org.uk>
Wed, 24 Feb 2016 13:18:12 +0000 (13:18 +0000)
System.Xml.Serialization.TypeDesc.CheckSupported might throw a
NotSupportedException, so catch it and ignore the current type

mcs/tools/sgen/sgen.cs

index d4f38b1c992231e24a17f53bd241c4fe807e8bf6..2ab376d3bfb61df230ed0c4312aa003b724d5913 100644 (file)
@@ -110,6 +110,9 @@ public class Driver
                                                Console.WriteLine (" - Warning: ignoring '" + t + "'");
                                                Console.WriteLine ("   " + ex.Message);
                                        }
+                               } catch (NotSupportedException ex) {
+                                       if (verbose)
+                                               Console.WriteLine (" - Warning: " + ex.Message);
                                }
                        }
                } else {
@@ -128,6 +131,9 @@ public class Driver
                                                Console.WriteLine (" - Warning: ignoring '" + type + "'");
                                                Console.WriteLine ("   " + ex.Message);
                                        }
+                               } catch (NotSupportedException ex) {
+                                       if (verbose)
+                                               Console.WriteLine (" - Warning: " + ex.Message);
                                }
                        }
                }