Add project
Basic formatting applied. Unnecessary comments have been removed. Suspicious code is covered by TODO.
This commit is contained in:
29
Hcs.Client/ClientApi/HcsException.cs
Normal file
29
Hcs.Client/ClientApi/HcsException.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace Hcs.ClientApi
|
||||
{
|
||||
public class HcsException : Exception
|
||||
{
|
||||
public HcsMemoryMessageCapture MessageCapture { get; private set; }
|
||||
|
||||
public HcsException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
|
||||
public HcsException(string message, Exception nestedException) : base(message, nestedException)
|
||||
{
|
||||
}
|
||||
|
||||
public HcsException(string message, HcsMemoryMessageCapture capture, Exception nestedException)
|
||||
: base(message, nestedException)
|
||||
{
|
||||
MessageCapture = capture;
|
||||
}
|
||||
|
||||
public static HcsException FindHcsException(Exception e)
|
||||
{
|
||||
return HcsUtil.EnumerateInnerExceptions(e).OfType<HcsException>().FirstOrDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user