|
|
@@ -3,6 +3,7 @@
|
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
|
|
using System.ComponentModel;
|
|
|
+using System.Diagnostics.CodeAnalysis;
|
|
|
using System.Reactive.PlatformServices;
|
|
|
|
|
|
namespace System.Reactive
|
|
|
@@ -11,6 +12,7 @@ namespace System.Reactive
|
|
|
{
|
|
|
private static readonly Lazy<IExceptionServices> Services = new Lazy<IExceptionServices>(Initialize);
|
|
|
|
|
|
+ [DoesNotReturn]
|
|
|
public static void Throw(this Exception exception) => Services.Value.Rethrow(exception);
|
|
|
|
|
|
public static void ThrowIfNotNull(this Exception? exception)
|
|
|
@@ -46,6 +48,7 @@ namespace System.Reactive.PlatformServices
|
|
|
/// Rethrows the specified exception.
|
|
|
/// </summary>
|
|
|
/// <param name="exception">Exception to rethrow.</param>
|
|
|
+ [DoesNotReturn]
|
|
|
void Rethrow(Exception exception);
|
|
|
}
|
|
|
}
|