This commit is contained in:
2024-12-09 17:53:19 +01:00
parent 05ab636670
commit 7a2d7641d4

View File

@@ -435,9 +435,9 @@ public class PrivateBank implements Bank, JsonSerializer<Transaction>, JsonDeser
JsonElement accountData = JsonParser.parseString(jsonContent);
try{
try {
transactions = readAccountHelper(accountData, accountName);
} catch (IOException e){
} catch (IOException e) {
System.out.println(e);
continue;
}
@@ -452,9 +452,9 @@ public class PrivateBank implements Bank, JsonSerializer<Transaction>, JsonDeser
for (JsonElement account : accountData.getAsJsonArray()) {
JsonObject accountObject = account.getAsJsonObject();
Transaction t;
try{
try {
t = deserialize(accountObject, null, null);
} catch (JsonParseException e){
} catch (JsonParseException e) {
throw new IOException("Fehler beim Laden des Accounts: " + accountName);
}
transactions.add(t);
@@ -478,9 +478,9 @@ public class PrivateBank implements Bank, JsonSerializer<Transaction>, JsonDeser
List<Transaction> transactions = this.accountsToTransactions.get(account);
for (Transaction transaction : transactions)
try{
try {
accountData.add(serialize(transaction, null, null));
} catch (JsonParseException e){
} catch (JsonParseException e) {
throw new IOException("Fehler beim Speichern des Accounts: " + account);
}