donaldlab / osprey-gui

A cross-platform GUI for OSPREY 3
GNU General Public License v2.0
0 stars 0 forks source link

Improve user error messaging when video drivers not installed in Linux #9

Open cuchaz opened 4 years ago

cuchaz commented 4 years ago

If a linux user doesn't have proper video drivers installed, the following cryptic exception occurs:

java.lang.Error: Can't get GLFW extensions
    at cuchaz.kludge.window.Windows$requiredVulkanExtensions$2.invoke(Windows.kt:42)
    at cuchaz.kludge.window.Windows$requiredVulkanExtensions$2.invoke(Windows.kt:16)
    at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
    at cuchaz.kludge.window.Windows.getRequiredVulkanExtensions(Windows.kt)
    at edu.duke.cs.molscope.gui.WindowCore.<init>(Window.kt:167)
    at edu.duke.cs.molscope.gui.Window.<init>(Window.kt:38)
    at edu.duke.cs.ospreygui.MainKt.main(main.kt:35)
    at edu.duke.cs.ospreygui.MainKt.main(main.kt)

Trap the error and show a more informative message to the user about how to fix the problem. ie, install video drivers.