public static void CatchIt() { try { CreateExceptions.ThrowIt("2"); } // Uncomment to show compiler warning/error. // catch (Exception e) { } catch (Exception) { } }
public static void ThrowIt() { try { CreateExceptions.ThrowIt("2"); } finally { throw new NotSupportedException(); } }
public static void Rethrow() { try { CreateExceptions.ThrowIt("2"); } catch (ArgumentException e) { throw e; } }