/
MethodInvokeFailedException.cs
37 lines (33 loc) · 1.23 KB
/
MethodInvokeFailedException.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System;
namespace VoltRpc.Communication;
/// <summary>
/// An <see cref="Exception" /> related to when a method fails on the host
/// </summary>
public class MethodInvokeFailedException : Exception
{
/// <summary>
/// Creates a new <see cref="MethodInvokeFailedException" /> instance
/// </summary>
/// <param name="innerExceptionMessage"></param>
/// <param name="innerStackTrace"></param>
private MethodInvokeFailedException(string innerExceptionMessage, string innerStackTrace)
: base(innerExceptionMessage)
{
StackTrace = innerStackTrace;
}
/// <summary>
/// Creates a new <see cref="MethodInvokeFailedException" /> instance
/// </summary>
/// <param name="message"></param>
/// <param name="stackTrace"></param>
/// <param name="innerExceptionMessage"></param>
/// <param name="innerStackTrace"></param>
internal MethodInvokeFailedException(string message, string stackTrace, string innerExceptionMessage,
string innerStackTrace)
: base(message, new MethodInvokeFailedException(innerExceptionMessage, innerStackTrace))
{
StackTrace = stackTrace;
}
/// <inheritdoc />
public override string StackTrace { get; }
}