aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Logging
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-10-29 15:08:39 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-10-29 15:08:39 +0200
commit5bf030a1137f09e9d9898c8a837e49a1af0468f9 (patch)
tree6535fef5affffe2b28bd87472c18383867510560 /Software/Visual_Studio/Tango.Logging
parent4973c8ff53c8758852f707af5cc7f4a6a82151e0 (diff)
downloadTango-5bf030a1137f09e9d9898c8a837e49a1af0468f9.tar.gz
Tango-5bf030a1137f09e9d9898c8a837e49a1af0468f9.zip
Improved some aspects of machine service and machine update.
Diffstat (limited to 'Software/Visual_Studio/Tango.Logging')
-rw-r--r--Software/Visual_Studio/Tango.Logging/ExceptionLogItem.cs25
-rw-r--r--Software/Visual_Studio/Tango.Logging/LogManager.cs2
2 files changed, 25 insertions, 2 deletions
diff --git a/Software/Visual_Studio/Tango.Logging/ExceptionLogItem.cs b/Software/Visual_Studio/Tango.Logging/ExceptionLogItem.cs
index de8485249..d2a1a352d 100644
--- a/Software/Visual_Studio/Tango.Logging/ExceptionLogItem.cs
+++ b/Software/Visual_Studio/Tango.Logging/ExceptionLogItem.cs
@@ -29,7 +29,30 @@ namespace Tango.Logging
{
get
{
- return Exception.Message;
+ if (Exception is AggregateException)
+ {
+ try
+ {
+ String message = String.Empty;
+
+ if (Description != null)
+ {
+ message += Description + Environment.NewLine;
+ }
+
+ message += String.Join(Environment.NewLine, (Exception as AggregateException).InnerExceptions.Select(x => x.Message));
+
+ return message;
+ }
+ catch
+ {
+ return Exception.Message;
+ }
+ }
+ else
+ {
+ return Exception.Message;
+ }
}
set { }
}
diff --git a/Software/Visual_Studio/Tango.Logging/LogManager.cs b/Software/Visual_Studio/Tango.Logging/LogManager.cs
index b67128a8d..04c66a71f 100644
--- a/Software/Visual_Studio/Tango.Logging/LogManager.cs
+++ b/Software/Visual_Studio/Tango.Logging/LogManager.cs
@@ -123,7 +123,7 @@ namespace Tango.Logging
log.TimeStamp = DateTime.Now;
log.Exception = e;
log.Category = category;
- log.Description = description != null ? description : e.ToString();
+ log.Description = description;
AppendLog(log);