mirror of
https://bitbucket.org/anguist/ntpa
synced 2026-09-30 14:01:13 +00:00
Improved error handling
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user