Add try/catch NoSuchFileException in FX demo
This commit is contained in:
parent
4f8efa0ee0
commit
2f570f2791
@ -3,6 +3,7 @@ package hep.dataforge.vision.solid.demo
|
||||
import hep.dataforge.vision.solid.gdml.gdml
|
||||
import javafx.stage.Stage
|
||||
import tornadofx.*
|
||||
import java.nio.file.NoSuchFileException
|
||||
import java.nio.file.Paths
|
||||
|
||||
class FXDemoApp : App(FXDemoGrid::class) {
|
||||
@ -16,11 +17,17 @@ class FXDemoApp : App(FXDemoGrid::class) {
|
||||
stage.height = 600.0
|
||||
|
||||
view.showcase()
|
||||
try {
|
||||
view.demo("gdml", "gdml-cubes") {
|
||||
gdml(Paths.get("D:\\Work\\Projects\\gdml.kt\\gdml-source\\cubes.gdml"))
|
||||
//setProperty(Material3D.MATERIAL_WIREFRAME_KEY, true)
|
||||
}
|
||||
}
|
||||
catch (e: NoSuchFileException) {
|
||||
println("GDML demo: Please specify the correct file path e.g. " +
|
||||
"visionforge\\demo\\gdml\\src\\commonMain\\resources\\cubes.gdml")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun main() {
|
||||
|
Loading…
Reference in New Issue
Block a user