diff --git a/src/main/java/org/jabref/gui/exporter/SaveDatabaseAction.java b/src/main/java/org/jabref/gui/exporter/SaveDatabaseAction.java index db4a591b1ec..edd299537a3 100644 --- a/src/main/java/org/jabref/gui/exporter/SaveDatabaseAction.java +++ b/src/main/java/org/jabref/gui/exporter/SaveDatabaseAction.java @@ -83,7 +83,7 @@ private boolean saveDatabase(Path file, boolean selectedOnly, Charset encoding, } catch (UnsupportedCharsetException ex) { throw new SaveException(Localization.lang("Character encoding '%0' is not supported.", encoding.displayName()), ex); } catch (IOException ex) { - throw new SaveException(ex); + throw new SaveException("Problems saving:", ex); } return true; diff --git a/src/main/java/org/jabref/logic/exporter/SaveException.java b/src/main/java/org/jabref/logic/exporter/SaveException.java index 88ef9693aed..b3e8c2171c9 100644 --- a/src/main/java/org/jabref/logic/exporter/SaveException.java +++ b/src/main/java/org/jabref/logic/exporter/SaveException.java @@ -15,7 +15,7 @@ public class SaveException extends Exception { public static final SaveException BACKUP_CREATION = new SaveException("Unable to create backup", Localization.lang("Unable to create backup")); - private final BibEntry entry; + private BibEntry entry; private int status; private String localizedMessage; @@ -46,18 +46,18 @@ public SaveException(String message, BibEntry entry) { this.entry = entry; } - public SaveException(String message, String localizedMessage, BibEntry entry) { - super(message); + public SaveException(String message, String localizedMessage, BibEntry entry, Throwable base) { + super(message, base); this.localizedMessage = localizedMessage; this.entry = entry; } public SaveException(Throwable base) { - this(base.getMessage(), base.getLocalizedMessage()); + super(base.getMessage(), base); } public SaveException(Throwable base, BibEntry entry) { - this(base.getMessage(), base.getLocalizedMessage(), entry); + this(base.getMessage(), base.getLocalizedMessage(), entry, base); } public int getStatus() {