File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -472,13 +472,14 @@ object KaTeX {
472472
473473// Provides access to resources of a bundled WebJar.
474474class WebJar (artifactId : String ) {
475+ import java .io .FileNotFoundException
475476 private val classLoader = classOf [WebJar ].getClassLoader
476477
477478 private val version : String =
478479 val propsPath = s " META-INF/maven/org.webjars.npm/ $artifactId/pom.properties "
479480 val stream = classLoader.getResourceAsStream(propsPath)
480481 if stream == null then
481- throw IllegalStateException (
482+ throw FileNotFoundException (
482483 s " Could not find pom.properties for webjar ' $artifactId' on the classpath. "
483484 )
484485 val props = java.util.Properties ()
@@ -490,7 +491,7 @@ class WebJar(artifactId: String) {
490491 val resourcePath = s " META-INF/resources/webjars/ $artifactId/ $version/ $path"
491492 val stream = classLoader.getResourceAsStream(resourcePath)
492493 if stream == null then
493- throw IllegalStateException (
494+ throw FileNotFoundException (
494495 s " Could not find resource ' $path' in webjar ' $artifactId' ( $version). "
495496 )
496497 String (stream.readAllBytes())
You can’t perform that action at this time.
0 commit comments