aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Transport/ResponseErrorException.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Tango.Transport/ResponseErrorException.cs')
-rw-r--r--Software/Visual_Studio/Tango.Transport/ResponseErrorException.cs32
1 files changed, 32 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Transport/ResponseErrorException.cs b/Software/Visual_Studio/Tango.Transport/ResponseErrorException.cs
new file mode 100644
index 000000000..365a5d432
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Transport/ResponseErrorException.cs
@@ -0,0 +1,32 @@
+using Google.Protobuf;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.PMR;
+using Tango.PMR.Common;
+
+namespace Tango.Transport
+{
+ /// <summary>
+ /// Represents a tango message response exception which indicates a response container with <see cref="ErrorCode"/> different from <see cref="ErrorCode.None"/>.
+ /// </summary>
+ /// <seealso cref="System.Exception" />
+ public class ResponseErrorException : Exception
+ {
+ /// <summary>
+ /// Gets or sets the error.
+ /// </summary>
+ public ErrorCode Error { get; set; }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ResponseErrorException{T}"/> class.
+ /// </summary>
+ /// <param name="error">The error.</param>
+ public ResponseErrorException(ErrorCode error) : base("Response received with error " + error.ToString())
+ {
+ Error = error;
+ }
+ }
+}