Inheritance: System.Exception
Esempio n. 1
0
 /// <summary>
 /// Writes a message indicating a command argument parse error to 
 /// the standard error stream.
 /// </summary>
 /// <param name="options">The options that failed to parse.</param>
 /// <param name="ex">The parsing exception that was thrown.</param>
 protected virtual void ParseError(OptionSet options, OptionException ex)
 {
     this.StandardError.Write("Tasty {0}: ", this.ArgumentName);
     this.StandardError.WriteLine(ex.Message);
     this.StandardError.WriteLine();
     options.WriteOptionDescriptions(this.StandardError);
     return;
 }
Esempio n. 2
0
 public static void WriteException(OptionException exception)
 {
     Console.Write("{0}: ", ProgramName);
     ShowException(exception);
     Console.WriteLine("Try '{0} --help' for more information.", ProgramName);
 }
Esempio n. 3
0
 /// <summary>
 /// Prints argument parse error information to the console.
 /// </summary>
 /// <param name="options">The option set that generated the error.</param>
 /// <param name="exception">The exception that represents the error.</param>
 private static void ParseError(OptionSet options, OptionException exception)
 {
     lock (SThreeQLConsole.SyncRoot)
     {
         Console.Error.WriteLine("s3ql: ", exception.Message);
         Console.Error.WriteLine();
         options.WriteOptionDescriptions(Console.Error);
     }
 }