From f39f9c71d9cb16d860cb5430d65676f6c79093f8 Mon Sep 17 00:00:00 2001 From: Daniel Wolf Date: Thu, 29 Mar 2018 21:49:58 +0200 Subject: [PATCH] Showing exception type for exceptions without message Before, the content area of the message box would be empty for these exceptions. --- VERSION.md | 1 + .../rhubarb_lip_sync/rhubarb_for_spine/AudioFileModel.kt | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/VERSION.md b/VERSION.md index dc36cac..245ba29 100644 --- a/VERSION.md +++ b/VERSION.md @@ -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 diff --git a/extras/EsotericSoftwareSpine/src/main/kotlin/com/rhubarb_lip_sync/rhubarb_for_spine/AudioFileModel.kt b/extras/EsotericSoftwareSpine/src/main/kotlin/com/rhubarb_lip_sync/rhubarb_for_spine/AudioFileModel.kt index 0a30f6a..fa293ba 100644 --- a/extras/EsotericSoftwareSpine/src/main/kotlin/com/rhubarb_lip_sync/rhubarb_for_spine/AudioFileModel.kt +++ b/extras/EsotericSoftwareSpine/src/main/kotlin/com/rhubarb_lip_sync/rhubarb_for_spine/AudioFileModel.kt @@ -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() } }