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); } }