Intercepting exceptions when the host is restarted

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2012-01-18 14:33:28 -08:00
parent e4faaac4b9
commit 7fd3b64222

View File

@@ -42,8 +42,13 @@ namespace Orchard.Environment {
}
public void Terminate() {
using (var events = _eventsFactory()) {
events.Value.Terminating();
try {
using (var events = _eventsFactory()) {
events.Value.Terminating();
}
}
catch {
// ignore exceptions while terminating the application
}
}
}