mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-19 01:57:55 +08:00
Intercepting exceptions when the host is restarted
--HG-- branch : 1.x
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user