diff --git a/src/Holon/Holon.csproj b/src/Holon/Holon.csproj index 8deceaa..e1324f2 100644 --- a/src/Holon/Holon.csproj +++ b/src/Holon/Holon.csproj @@ -2,7 +2,7 @@ netstandard1.6 - 0.2.1 + 0.2.2 Alan Doherty Alan Doherty A minimal service and event bus with additional support for RPC @@ -10,11 +10,11 @@ https://github.com/alandoherty/holon-net https://github.com/alandoherty/holon-net git - 0.2.1.0 + 0.2.2.0 https://github.com/alandoherty/holon-net/blob/master/LICENSE true https://s3-eu-west-1.amazonaws.com/assets.alandoherty.co.uk/github/holon-net-nuget.png - 0.2.1.0 + 0.2.2.0 diff --git a/src/Holon/Remoting/RpcBehaviour.cs b/src/Holon/Remoting/RpcBehaviour.cs index 0f11f3c..353021f 100644 --- a/src/Holon/Remoting/RpcBehaviour.cs +++ b/src/Holon/Remoting/RpcBehaviour.cs @@ -416,7 +416,7 @@ public Task GetInterfaceInfo(string @interface) { lock (_behaviour._behaviours) { if (!_behaviour._behaviours.TryGetValue(@interface, out binding) || !binding.AllowIntrospection) - throw new RpcException("InterfaceNotFound", "The interface does not exist", null); + throw new RpcException("InterfaceNotFound", "The interface does not exist", (string)null); } return Task.FromResult(binding.Introspection); diff --git a/src/Holon/Remoting/RpcException.cs b/src/Holon/Remoting/RpcException.cs index 1c8ff08..d317fab 100644 --- a/src/Holon/Remoting/RpcException.cs +++ b/src/Holon/Remoting/RpcException.cs @@ -29,7 +29,7 @@ public string Code { /// public string Details { get { - return _details; + return _details ?? ToString(); } } #endregion @@ -41,12 +41,35 @@ public string Details { /// The code. /// The message. /// The details. - public RpcException(string code, string message, string details) + internal RpcException(string code, string message, string details) : base(message) { _code = code; _details = details; } + /// + /// Creates a new RPC excpetion with the provided code and message. + /// + /// The code. + /// The message. + public RpcException(string code, string message) + : base(message) + { + _code = code; + } + + /// + /// Creates a new RPC excpetion with the provided code and message. + /// + /// The code. + /// The message. + /// The inner exception. + public RpcException(string code, string message, Exception innerException) + : base(message, innerException) + { + _code = code; + } + /// /// Creates a new RPC exception with the RPC error object. ///