ExceptionExtensionMethods.cs 326 B

1234567891011121314
  1. using System;
  2. using System.Runtime.ExceptionServices;
  3. namespace OpenVIII
  4. {
  5. public static class ExceptionExtensionMethods
  6. {
  7. public static T Rethrow<T>(this T exception) where T : Exception
  8. {
  9. ExceptionDispatchInfo.Capture(exception).Throw();
  10. throw exception;
  11. }
  12. }
  13. }