Patched to ignore trailing spaces
[mono.git] / mcs / tools / mono-xsd / NewMonoXSD.cs
index de7c0f992d3e81923383fda680faf5d9817e1b23..b0c983b5438c68847307e86eb5fe7e00c428dfef 100644 (file)
@@ -78,9 +78,12 @@ namespace Mono.Util {
                        {\r
                                new Driver().Run (args);\r
                        }\r
-                       catch (Exception ex)\r
+                       catch (ApplicationException ex)\r
                        {\r
                                Console.WriteLine (ex.Message);\r
+                       }\r
+                       catch (Exception ex)\r
+                       {\r
                                Console.WriteLine (ex);\r
                        }\r
                }\r
@@ -118,7 +121,7 @@ namespace Mono.Util {
                                {\r
                                        if ((arg.EndsWith (".dll") || arg.EndsWith (".exe")) && !arg.Substring (1).StartsWith ("generator:") && !arg.Substring (1).StartsWith ("g:"))\r
                                        {\r
-                                               if (!readingFiles) throw new Exception (incorrectOrder);\r
+                                               if (!readingFiles) throw new ApplicationException (incorrectOrder);\r
                                                assemblies.Add (arg);\r
                                                assemblyOptions = true;\r
                                                continue;\r
@@ -474,12 +477,12 @@ namespace Mono.Util {
 \r
                public void Error (string msg)\r
                {\r
-                       throw new Exception (msg);\r
+                       throw new ApplicationException (msg);\r
                }\r
 \r
                public void Error (string msg, string param)\r
                {\r
-                       throw new Exception (string.Format(msg,param));\r
+                       throw new ApplicationException (string.Format(msg,param));\r
                }\r
 \r
                private string StripQuot (string input)\r