mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-21 03:44:20 +08:00
Intercepting exceptions when the host is restarted
--HG-- branch : 1.x
This commit is contained in:
@@ -42,9 +42,14 @@ namespace Orchard.Environment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void Terminate() {
|
public void Terminate() {
|
||||||
|
try {
|
||||||
using (var events = _eventsFactory()) {
|
using (var events = _eventsFactory()) {
|
||||||
events.Value.Terminating();
|
events.Value.Terminating();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch {
|
||||||
|
// ignore exceptions while terminating the application
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user