From e3f58f8f5a3604ced2fa9a6283e56be2bff6ce0e Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Sun, 15 Mar 2020 01:21:20 +0000 Subject: [PATCH] catch general exceptions because otherwise they get lost in the executor thread --- .../groovy/com/muwire/core/files/PersisterFolderService.groovy | 2 +- .../main/groovy/com/muwire/core/files/PersisterService.groovy | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/groovy/com/muwire/core/files/PersisterFolderService.groovy b/core/src/main/groovy/com/muwire/core/files/PersisterFolderService.groovy index ef2814a6..21b1e292 100644 --- a/core/src/main/groovy/com/muwire/core/files/PersisterFolderService.groovy +++ b/core/src/main/groovy/com/muwire/core/files/PersisterFolderService.groovy @@ -116,7 +116,7 @@ class PersisterFolderService extends BasePersisterService { try { _load() } - catch (IllegalArgumentException e) { + catch (Exception e) { log.log(Level.WARNING, "couldn't load files", e) } } else { diff --git a/core/src/main/groovy/com/muwire/core/files/PersisterService.groovy b/core/src/main/groovy/com/muwire/core/files/PersisterService.groovy index a7a861cf..4131ffd9 100644 --- a/core/src/main/groovy/com/muwire/core/files/PersisterService.groovy +++ b/core/src/main/groovy/com/muwire/core/files/PersisterService.groovy @@ -62,7 +62,7 @@ class PersisterService extends BasePersisterService { new File(location.absolutePath + ".bak") ) listener.publish(new PersisterDoneEvent()) - } catch (IllegalArgumentException e) { + } catch (Exception e) { log.log(Level.WARNING, "couldn't load files",e) } } else {