[smuxi/experiments/new_chat_sync_manager: 5/5] Frontend: catch all exceptions in thread pool workers to prevent AppDomain shutdowns



commit d0ab41c639eca0c5acfd9193a44cc1f08b03e095
Author: Mirco Bauer <meebey meebey net>
Date:   Sun Jul 20 21:28:13 2014 +0200

    Frontend: catch all exceptions in thread pool workers to prevent AppDomain shutdowns

 src/Frontend/ChatViewSyncManager.cs |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/Frontend/ChatViewSyncManager.cs b/src/Frontend/ChatViewSyncManager.cs
index 8330b32..7700fcd 100644
--- a/src/Frontend/ChatViewSyncManager.cs
+++ b/src/Frontend/ChatViewSyncManager.cs
@@ -377,7 +377,7 @@ namespace Smuxi.Frontend
             WorkerQueue.Enqueue(delegate {
                 try {
                     chat.ExecuteAdd();
-                } catch (InvalidStateException ex) {
+                } catch (Exception ex) {
 #if LOG4NET
                     Logger.Error("QueueAdd(): ExecuteAdd() threw exception!" , ex);
 #endif
@@ -405,7 +405,7 @@ namespace Smuxi.Frontend
             WorkerQueue.Enqueue(delegate {
                 try {
                     chat.ExecuteRemove();
-                } catch (InvalidStateException ex) {
+                } catch (Exception ex) {
 #if LOG4NET
                     Logger.Error("QueueRemove(): ExecuteRemove() threw exception!" , ex);
 #endif
@@ -434,7 +434,7 @@ namespace Smuxi.Frontend
             WorkerQueue.Enqueue(delegate {
                 try {
                     chat.ExecuteRemoveFinished();
-                } catch (InvalidStateException ex) {
+                } catch (Exception ex) {
 #if LOG4NET
                     Logger.Error("QueueRemoveFinished(): ExecuteRemoveFinished() threw exception!" , ex);
 #endif
@@ -487,7 +487,7 @@ namespace Smuxi.Frontend
             WorkerQueue.Enqueue(delegate {
                 try {
                     chat.ExecuteSync();
-                } catch (InvalidStateException ex) {
+                } catch (Exception ex) {
 #if LOG4NET
                     Logger.Error("QueueSync(): ExecuteSync() threw exception!" , ex);
 #endif
@@ -520,7 +520,7 @@ namespace Smuxi.Frontend
             WorkerQueue.Enqueue(delegate {
                 try {
                     chat.ExecuteReadyToSync();
-                } catch (InvalidStateException ex) {
+                } catch (Exception ex) {
 #if LOG4NET
                     Logger.Error("ReadyToSyncWorker(): ExecuteReadyToSync() threw exception!" , ex);
 #endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]