diff --git a/BitcoinRpcSharp/BitcoinRpcException.cs b/BitcoinRpcSharp/BitcoinRpcException.cs index ac8047d..16b6181 100644 --- a/BitcoinRpcSharp/BitcoinRpcException.cs +++ b/BitcoinRpcSharp/BitcoinRpcException.cs @@ -28,4 +28,26 @@ protected BitcoinRpcException(System.Runtime.Serialization.SerializationInfo inf { } } + + + [Serializable] + public class BitcoinRpcServerErrorException : BitcoinRpcException + { + public BitcoinRpcServerErrorException() { } + public BitcoinRpcServerErrorException(string message) : base(message) { } + public BitcoinRpcServerErrorException(string message, Exception inner) : base(message, inner) { } + protected BitcoinRpcServerErrorException( + System.Runtime.Serialization.SerializationInfo info, + System.Runtime.Serialization.StreamingContext context) + : base(info, context) { } + public JsonRpcResponse JsonObject { get; set; } + + public RPCErrorCode RpcErrorCode + { + get + { + return JsonObject.Error.Code; + } + } + } } diff --git a/BitcoinRpcSharp/BitcoinRpcSharp.csproj b/BitcoinRpcSharp/BitcoinRpcSharp.csproj index 7569355..9be1669 100644 --- a/BitcoinRpcSharp/BitcoinRpcSharp.csproj +++ b/BitcoinRpcSharp/BitcoinRpcSharp.csproj @@ -11,6 +11,8 @@ BitcoinRpcSharp v4.5 512 + ..\..\..\src\ + true AnyCPU @@ -35,8 +37,9 @@ - - ..\packages\Newtonsoft.Json.5.0.6\lib\net45\Newtonsoft.Json.dll + + False + ..\..\..\src\packages\Newtonsoft.Json.6.0.3\lib\net45\Newtonsoft.Json.dll @@ -84,6 +87,13 @@ + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + +