Improved error handling

This commit is contained in:
2016-03-14 21:38:34 +01:00
parent 182e69786e
commit 8994b34603
26 changed files with 787 additions and 85 deletions
+6 -3
View File
@@ -25,11 +25,11 @@
// THE SOFTWARE.
using System;
using System.Collections.Generic;
using Ntp.Analyzer.Log;
using System.IO;
using System.Threading;
using System.Security.AccessControl;
using System.Security.Principal;
using System.Threading;
using Ntp.Analyzer.Log;
namespace Ntp.Process
{
@@ -86,8 +86,9 @@ namespace Ntp.Process
if (answer != null && answer == "active") {
otherActive = true;
}
} catch (Exception) {
} catch (Exception e) {
log.WriteLine ("Error while contacting cluster node " + request, Severity.Warn);
log.WriteLine (e, Severity.Trace);
}
}
@@ -99,6 +100,7 @@ namespace Ntp.Process
} catch (Exception e) {
log.WriteLine ("Error in scheduler module. Arborting.", Severity.Error);
log.WriteLine (e.ToString (), Severity.Error);
log.WriteLine (e, Severity.Trace);
return;
}
} else {
@@ -125,6 +127,7 @@ namespace Ntp.Process
} catch (Exception e) {
log.WriteLine ("Error in mutux. Arborting.", Severity.Error);
log.WriteLine (e.ToString (), Severity.Error);
log.WriteLine (e, Severity.Trace);
}
log.WriteLine ("Closing down.", Severity.Notice);