2020-06-29 04:44:35 +02:00
|
|
|
using System;
|
2020-06-08 16:40:58 +02:00
|
|
|
|
|
|
|
namespace BTCPayServer.Client
|
|
|
|
{
|
2022-01-14 05:05:23 +01:00
|
|
|
public class GreenfieldAPIException : Exception
|
2020-06-08 16:40:58 +02:00
|
|
|
{
|
2022-01-14 05:05:23 +01:00
|
|
|
public GreenfieldAPIException(int httpCode, Models.GreenfieldAPIError error) : base(error.Message)
|
2020-06-08 16:40:58 +02:00
|
|
|
{
|
|
|
|
if (error == null)
|
|
|
|
throw new ArgumentNullException(nameof(error));
|
2021-12-16 04:32:13 +01:00
|
|
|
HttpCode = httpCode;
|
2020-06-08 16:40:58 +02:00
|
|
|
APIError = error;
|
|
|
|
}
|
|
|
|
public Models.GreenfieldAPIError APIError { get; }
|
2021-12-16 04:32:13 +01:00
|
|
|
public int HttpCode { get; set; }
|
2020-06-08 16:40:58 +02:00
|
|
|
}
|
|
|
|
}
|