Showing exception type for exceptions without message

Before, the content area of the message box would be empty for these exceptions.
This commit is contained in:
Daniel Wolf 2018-03-29 21:49:58 +02:00
parent b94d894c36
commit f39f9c71d9
2 changed files with 6 additions and 1 deletions

View File

@ -2,6 +2,7 @@
## Unreleased
* More helpful error dialogs for internal errors in Rhubarb Lip Sync for Spine
* Internal errors in Rhubarb Lip Sync for Spine are logged to stderr
## Version 1.7.0

View File

@ -167,7 +167,11 @@ class AudioFileModel(
Platform.runLater {
Alert(Alert.AlertType.ERROR).apply {
headerText = "Error performing lip sync for event '$eventName'."
contentText = e.message
contentText = if (e.message.isNullOrEmpty())
// Some exceptions don't have a message
"An internal error of type ${e.javaClass.name} occurred."
else
e.message
show()
}
}