aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Transport
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-04-11 00:54:54 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-04-11 00:54:54 +0300
commitcb1b51c238c64f570d73b7dca6a2eee205b2da01 (patch)
treedae3c0d5da9d003cb6860431d763eaad0dd5caf7 /Software/Visual_Studio/Tango.Transport
parentb4682a3abfe299c19b24752b2fb1ce2477611ec3 (diff)
downloadTango-cb1b51c238c64f570d73b7dca6a2eee205b2da01.tar.gz
Tango-cb1b51c238c64f570d73b7dca6a2eee205b2da01.zip
Implemented FSE bug reporting !!!
Diffstat (limited to 'Software/Visual_Studio/Tango.Transport')
-rw-r--r--Software/Visual_Studio/Tango.Transport/Web/WebTransportClient.cs47
1 files changed, 27 insertions, 20 deletions
diff --git a/Software/Visual_Studio/Tango.Transport/Web/WebTransportClient.cs b/Software/Visual_Studio/Tango.Transport/Web/WebTransportClient.cs
index fde08b968..14b9a7562 100644
--- a/Software/Visual_Studio/Tango.Transport/Web/WebTransportClient.cs
+++ b/Software/Visual_Studio/Tango.Transport/Web/WebTransportClient.cs
@@ -103,36 +103,43 @@ namespace Tango.Transport.Web
}
catch (HttpRequestException ex)
{
- String message = JObject.Parse(data).GetValue("Message").ToString();
- Exception exception = null;
-
try
{
- String exceptionMessage = JObject.Parse(data).GetValue("ExceptionMessage").ToString();
- String exceptionType = JObject.Parse(data).GetValue("ExceptionType").ToString();
- String stackTrace = JObject.Parse(data).GetValue("StackTrace").ToString();
- Type type = GetType(exceptionType);
- if (type != null)
+ String message = JObject.Parse(data).GetValue("Message").ToString();
+ Exception exception = null;
+
+ try
{
- exception = Activator.CreateInstance(type, new object[] { exceptionMessage + "\n" + stackTrace }) as Exception;
-
+ String exceptionMessage = JObject.Parse(data).GetValue("ExceptionMessage").ToString();
+ String exceptionType = JObject.Parse(data).GetValue("ExceptionType").ToString();
+ String stackTrace = JObject.Parse(data).GetValue("StackTrace").ToString();
+ Type type = GetType(exceptionType);
+ if (type != null)
+ {
+ exception = Activator.CreateInstance(type, new object[] { exceptionMessage + "\n" + stackTrace }) as Exception;
+
+ }
+ else
+ {
+ exception = new HttpException(exceptionMessage + "\n" + stackTrace);
+ }
}
- else
+ catch
{
- exception = new HttpException(exceptionMessage + "\n" + stackTrace);
+ if (message == null)
+ {
+ Logging.LogManager.Default.Log($"Error parsing response message!\n{data}");
+ }
+
+ throw new HttpRequestException(ex.Message + " " + message);
}
+
+ throw exception;
}
catch
{
- if (message == null)
- {
- Logging.LogManager.Default.Log($"Error parsing response message!\n{data}");
- }
-
- throw new HttpRequestException(ex.Message + " " + message);
+ throw ex;
}
-
- throw exception;
}
return JsonConvert.DeserializeObject<Response>(data);