mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-12-28 00:53:26 +01:00
imported signalr 1.1.3 into NzbDrone.
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.AspNet.SignalR.Infrastructure
|
||||
{
|
||||
internal static class ExceptionsExtensions
|
||||
{
|
||||
internal static Exception Unwrap(this Exception ex)
|
||||
{
|
||||
if (ex == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var next = ex.GetBaseException();
|
||||
while (next.InnerException != null)
|
||||
{
|
||||
// On mono GetBaseException() doesn't seem to do anything
|
||||
// so just walk the inner exception chain.
|
||||
next = next.InnerException;
|
||||
}
|
||||
|
||||
return next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user