Skip to content

Commit

Permalink
Add uncaught exception message (JabRef#4565)
Browse files Browse the repository at this point in the history
* Add error message for uncaught exceptions

Added a new view to the project. It's shown after the uncaught exception is logged.

* Add simple text to fallback error view

Added a label asking the user to look into the logfiles for more details.

* Add error message to language files

Added the error message to the german and english language files.

* Add ErrorDialogAndWait

Removed the FallbackErrorView. Added the showErrorDialogAndWait call instead.
  • Loading branch information
Le-wi authored and Siedlerchr committed Jan 5, 2019
1 parent 9ea2164 commit 7d69a7c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- We fixed an issue where only one PDF file could be imported [#4422](https://github.com/JabRef/jabref/issues/4422)
- We fixed an issue where "Move to group" would always move the first entry in the library and not the selected [#4414](https://github.com/JabRef/jabref/issues/4414)
- We fixed an issue where an older dialog appears when downloading full texts from the quality menu. [#4489](https://github.com/JabRef/jabref/issues/4489)

- We fixed an issue where uncaught exceptions were logged but the user wasn't informed about their occurance. [#2288] (https://github.com/JabRef/jabref/issues/2288)



Expand Down
4 changes: 4 additions & 0 deletions src/main/java/org/jabref/FallbackExceptionHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,9 @@ public static void installExceptionHandler() {
@Override
public void uncaughtException(Thread thread, Throwable exception) {
LOGGER.error("Uncaught exception occurred in " + thread, exception);
JabRefGUI.getMainFrame()
.getDialogService()
.showErrorDialogAndWait(
exception.getLocalizedMessage(), exception);
}
}
3 changes: 0 additions & 3 deletions src/main/resources/l10n/JabRef_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2200,6 +2200,3 @@ Website=Webseite
Write\ XMP-metadata\ to\ PDFs=&XMP-Metadaten in PDFs schreiben

Override\ default\ font\ settings=Standardschrifteinstellungen überschreiben



2 changes: 1 addition & 1 deletion src/main/resources/l10n/JabRef_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2239,4 +2239,4 @@ Main\ layout\ file\:=Main layout file\:
Main\ layout\ file=Main layout file
Save\ exporter=Save exporter
File\ extension\:=File extension\:
Export\ format\ name\:=Export format name\:
Export\ format\ name\:=Export format name\:

0 comments on commit 7d69a7c

Please sign in to comment.