From fb022863095d01182f028cbe1a4d1f0c2e3f3eaf Mon Sep 17 00:00:00 2001 From: Juho Saarinen Date: Fri, 3 Aug 2018 06:54:11 +0000 Subject: [PATCH] Catching all exceptions --- .../github/hi_fi/tcpMockeServer/service/FileService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/github/hi_fi/tcpMockeServer/service/FileService.java b/src/main/java/com/github/hi_fi/tcpMockeServer/service/FileService.java index e73bfd4..371d1c9 100644 --- a/src/main/java/com/github/hi_fi/tcpMockeServer/service/FileService.java +++ b/src/main/java/com/github/hi_fi/tcpMockeServer/service/FileService.java @@ -35,8 +35,8 @@ public File exportCacheToFile() { ObjectMapper objectMapper = new ObjectMapper(); objectMapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); objectMapper.writeValue(outputFile, cache.getMessageDatas()); - } catch (IOException ioe) { - log.error("Generation of export YAML failed", ioe); + } catch (Exception e) { + log.error("Generation of export YAML failed", e); } return outputFile; } @@ -53,7 +53,7 @@ public void importCacheFromFile(MultipartFile file) { } cache.appendToMessageDatas(dataItem.getValue()); } - } catch (IOException e) { + } catch (Exception e) { log.error("Reading of import YAML failed", e); } }