Skip to content

Commit 3bfa1d1

Browse files
committed
Check that the templates exist before using them
1 parent 9108b8f commit 3bfa1d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kotlin-jvm/src/main/kotlin/playground/Velocity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ fun main() {
2020
println("# Velocity")
2121

2222
val engine = velocityEngine()
23-
helloWorld(engine)
24-
complexExample(engine)
23+
if (engine.resourceExists("/hello.vm")) helloWorld(engine)
24+
if (engine.resourceExists("/complex.vm")) complexExample(engine)
2525
}
2626

2727

0 commit comments

Comments
 (0)