Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load additional views throws an error if the /misc/views dir doesn't exist #1192

Open
K-Meech opened this issue Dec 1, 2024 · 0 comments
Open

Comments

@K-Meech
Copy link
Collaborator

K-Meech commented Dec 1, 2024

To reproduce:

  • Open Platybrowser
  • Right click in viewer and select 'Load Additional Views'
  • Load from 'Current project'

Error thrown:

java.lang.RuntimeException
Exception in thread "Thread-32" java.lang.RuntimeException: java.lang.RuntimeException
	at org.embl.mobie.io.github.RESTCaller.get(RESTCaller.java:102)
	at org.embl.mobie.io.github.GitHubContentGetter.getContent(GitHubContentGetter.java:66)
	at org.embl.mobie.io.github.GitHubUtils.getFilePaths(GitHubUtils.java:98)
	at org.embl.mobie.io.github.GitHubUtils.getFileNames(GitHubUtils.java:92)
	at org.embl.mobie.io.util.IOHelper.getFileNames(IOHelper.java:336)
	at org.embl.mobie.ui.UserInterfaceHelper.selectPathFromProject(UserInterfaceHelper.java:238)
	at org.embl.mobie.lib.view.AdditionalViewsLoader.lambda$loadAdditionalViewsDialog$0(AdditionalViewsLoader.java:59)
	at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.RuntimeException
	at org.embl.mobie.io.github.RESTCaller.parseResponse(RESTCaller.java:113)
	at org.embl.mobie.io.github.RESTCaller.get(RESTCaller.java:99)
	... 7 more

An additional check is needed that /misc/views exists and there is at least one json file inside of it. Otherwise, show a message that no additional views are available, or don't show the 'current project' option at the start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant