handle module errors

This commit is contained in:
Bixilon 2022-11-26 20:48:22 +01:00
parent a99fc83b9e
commit ed0dee2e5a
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -101,8 +101,13 @@ object PixLyzer {
println("Can not find module: $module")
continue
}
try {
clazz.forceInit()
clazz.getDeclaredMethod("start").invoke(null)
} catch (error: Throwable) {
println("Can not execute module: $error")
error.printStackTrace()
}
}
val all: MutableMap<String, Any> = mutableMapOf()