2004-07-12 Lluis Sanchez Gual <lluis@novell.com>
authorLluis Sanchez <lluis@novell.com>
Fri, 21 Jan 2005 18:09:24 +0000 (18:09 -0000)
committerLluis Sanchez <lluis@novell.com>
Fri, 21 Jan 2005 18:09:24 +0000 (18:09 -0000)
* NewMonoXSD.cs: Don't write the exception trace for common parameter
errors.

svn path=/trunk/mcs/; revision=39322

mcs/tools/mono-xsd/ChangeLog
mcs/tools/mono-xsd/NewMonoXSD.cs

index 5f6777091a5a85afa136c64f3b4512dd8f112623..f0a0f73b9d93b5d66157db7c27ee8419bd11a2dc 100644 (file)
@@ -1,3 +1,8 @@
+2004-07-12  Lluis Sanchez Gual  <lluis@novell.com>
+
+       * NewMonoXSD.cs: Don't write the exception trace for common parameter
+       errors.
+
 2005-01-11  Atsushi Enomoto <atsushi@ximian.com>
 
        * NewMonoXSD.cs : by default, dataset namespace is not "Schemas" but
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