Beispiel #1
0
 private static void RethrowException()
 {
     try
     {
         ExceptionTests.Throw();
     }
     catch (ArgumentNullException)
     {
         throw;
     }
 }
Beispiel #2
0
 public static void CreateThrowAndPrint()
 {
     try
     {
         ExceptionTests.Throw();
     }
     catch (ArgumentNullException e)
     {
         e.Print();
     }
 }
Beispiel #3
0
 private static void RethrowExceptionWithReference()
 {
     try
     {
         ExceptionTests.Throw();
     }
     catch (ArgumentNullException e)
     {
         throw e;
     }
 }
Beispiel #4
0
 public static void CreateThrowAndPrintWithInner()
 {
     try
     {
         try
         {
             ExceptionTests.Throw();
         }
         catch (ArgumentNullException e)
         {
             throw new InvalidNameException("Custom", e);
         }
     }
     catch (InvalidNameException e)
     {
         e.Print();
     }
 }