Log the exception when BEAUti fails to switch a model - #125
Merged
Conversation
When selecting a value in a model dropdown fails, the combo handler in
BEASTObjectInputEditor showed a dialog ("Could not select beastObject: ...")
but never logged the exception, so there was no stack trace to work from --
exactly the situation in BEAST2-Dev/bModelTest#9, where switching the
substitution model to HKY while BEAST Model Test was active produced a
dialog and nothing in the console. The underlying error was
'Cannot find template for removing RevJump.s:dna' from
BeautiSubTemplate.removeSubNet, invisible until now.
Print the stack trace before showing the dialog.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When selecting a value in a model dropdown fails, the combo handler in
BEASTObjectInputEditor.addComboBoxshows a dialog:but never logs the exception, so there is no stack trace to diagnose from. This is the situation in BEAST2-Dev/bModelTest#9: switching the substitution model to HKY while "BEAST Model Test" is the site model pops a dialog with nothing in the console. With the stack trace restored, the real cause is visible:
This PR just adds
ex.printStackTrace()before the dialog, so selection failures are diagnosable. (TheCannot find template for removingfailure itself is a separate matter —removeSubNetthrows when noBeautiSubTemplatematches the model being replaced.)