using System; using System.Runtime.ExceptionServices; namespace Abp.Extensions { /// /// Extension methods for class. /// public static class ExceptionExtensions { /// /// Uses method to re-throws exception /// while preserving stack trace. /// /// Exception to be re-thrown public static void ReThrow(this Exception exception) { ExceptionDispatchInfo.Capture(exception).Throw(); } } }