aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Logging
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-08-23 10:23:17 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-08-23 10:23:17 +0300
commit6a57fbce8bf9931ecfd03c6e91f2fb25be4e7d9f (patch)
tree92bc7391888a7673e8838afea83ae74fb1becdd0 /Software/Visual_Studio/Tango.Logging
parent2c8da378c82e5181f0566a564de529ab7ef96f4f (diff)
downloadTango-6a57fbce8bf9931ecfd03c6e91f2fb25be4e7d9f.tar.gz
Tango-6a57fbce8bf9931ecfd03c6e91f2fb25be4e7d9f.zip
Implemented new hardware components "Active" on machine operator upload hardware configuration.
Improved and tested global exception trapper on async task. Fixed a weird issue on navigation control toAnimation complete's twice.
Diffstat (limited to 'Software/Visual_Studio/Tango.Logging')
-rw-r--r--Software/Visual_Studio/Tango.Logging/GlobalExceptionTrapper.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Software/Visual_Studio/Tango.Logging/GlobalExceptionTrapper.cs b/Software/Visual_Studio/Tango.Logging/GlobalExceptionTrapper.cs
index 5b917992e..5ee714cb6 100644
--- a/Software/Visual_Studio/Tango.Logging/GlobalExceptionTrapper.cs
+++ b/Software/Visual_Studio/Tango.Logging/GlobalExceptionTrapper.cs
@@ -15,7 +15,7 @@ namespace Tango.Logging
/// <seealso cref="Tango.Logging.IGlobalExceptionTrapper" />
public class WpfGlobalExceptionTrapper : IGlobalExceptionTrapper
{
- private DateTime _lastGlobalExceptionTime = DateTime.Now;
+ private DateTime _lastGlobalExceptionTime = DateTime.Now.AddMinutes(-1);
/// <summary>
/// Occurs when the global exception trapper has detected an unhandled exception.
@@ -81,8 +81,9 @@ namespace Tango.Logging
/// <param name="error">The error.</param>
private bool OnApplicationCrash(Exception exception)
{
- if (DateTime.Now - _lastGlobalExceptionTime > TimeSpan.FromSeconds(1))
+ if (DateTime.Now < _lastGlobalExceptionTime.AddSeconds(1))
{
+ LogManager.Default.Log(exception, LogCategory.Critical);
_lastGlobalExceptionTime = DateTime.Now;
return true;
}