예제 #1
0
파일: Program.cs 프로젝트: rfellers/pwiz
        static void Main(string[] args)
        {
            try
            {
                Environment.ExitCode = -1;  // Failure until success

                var builder = new BuildThermoMethod();
                builder.ParseCommandArgs(args);
                builder.Build();

                Environment.ExitCode = 0;
            }
            catch (UsageException x)
            {
                if (!string.IsNullOrEmpty(x.Message))
                {
                    Console.Error.WriteLine("ERROR: {0}", x.Message);
                }
                Usage();
            }
            catch (IOException x)
            {
                Console.Error.Write(GetErrorText(x));
            }
            catch (Exception x)
            {
                Console.Error.Write(GetErrorText(x));
            }
        }
예제 #2
0
        static void Main(string[] args)
        {
            try
            {
                Environment.ExitCode = -1;  // Failure until success

                var builder = new BuildThermoMethod();
                builder.ParseCommandArgs(args);
                builder.Build();

                Environment.ExitCode = 0;
            }
            catch (UsageException)
            {
                Usage();
            }
            catch (IOException x)
            {
                Console.Error.WriteLine("ERROR: {0}", x.Message);
            }
            catch (Exception x)
            {
                Console.Error.WriteLine("ERROR: {0}", x.Message);
            }
        }