From ddfbb9bbd0b8917345c54566ea2e499f44f15441 Mon Sep 17 00:00:00 2001 From: schrom01 Date: Thu, 12 May 2022 22:45:10 +0200 Subject: [PATCH] added error Message for file reading error --- .../zhaw/projekt2/turnierverwaltung/FactoryDecorator.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/ch/zhaw/projekt2/turnierverwaltung/FactoryDecorator.java b/app/src/main/java/ch/zhaw/projekt2/turnierverwaltung/FactoryDecorator.java index e993fad..0026069 100644 --- a/app/src/main/java/ch/zhaw/projekt2/turnierverwaltung/FactoryDecorator.java +++ b/app/src/main/java/ch/zhaw/projekt2/turnierverwaltung/FactoryDecorator.java @@ -51,11 +51,11 @@ public class FactoryDecorator implements IsObservable{ try { factory.setTournament(fileIO.loadTournament(tournamentFile)); openScheduleView(); - } catch (IOException e) { + clearMessage(false); + } catch (IOException | ClassNotFoundException e) { e.printStackTrace(); - } catch (ClassNotFoundException e) { - e.printStackTrace(); - } //TODO handle and logging + printMessageToFooter("Fehler beim lesen der Datei.", true); + } //TODO handle and logging } public void openTournamentList() {