| 1 |
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. |
| 2 |
|
| 3 |
#if HAS_EDI |
| 4 |
namespace System.Reactive.PlatformServices |
| 5 |
{ |
| 6 |
// |
| 7 |
// WARNING: This code is kept *identically* in two places. One copy is kept in System.Reactive.Core for non-PLIB platforms. |
| 8 |
// Another copy is kept in System.Reactive.PlatformServices to enlighten the default lowest common denominator |
| 9 |
// behavior of Rx for PLIB when used on a more capable platform. |
| 10 |
// |
| 11 |
internal class DefaultExceptionServices/*Impl*/ : IExceptionServices |
| 12 |
{ |
| 13 |
public void Rethrow(Exception exception) |
| 14 |
{ |
| 15 |
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Capture(exception).Throw(); |
| 16 |
} |
| 17 |
} |
| 18 |
} |
| 19 |
#else |
| 20 |
namespace System.Reactive.PlatformServices |
| 21 |
{ |
| 22 |
internal class DefaultExceptionServices : IExceptionServices |
| 23 |
{ |
| 24 |
public void Rethrow(Exception exception) |
| 25 |
{ |
| 26 |
throw exception; |
| 27 |
} |
| 28 |
} |
| 29 |
} |
| 30 |
#endif |