mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-24 14:30:09 +08:00
[Console] Track plugin file path into error stack; iTXTech/mirai-console-loader#128
This commit is contained in:
parent
42334c42c5
commit
9a8b696132
@ -207,7 +207,7 @@ internal class JvmPluginClassLoaderN : URLClassLoader {
|
||||
this.sharedLibrariesLogger = ctx.sharedLibrariesLoader
|
||||
this.file = file
|
||||
this.ctx = ctx
|
||||
init0()
|
||||
init1()
|
||||
}
|
||||
|
||||
@Suppress("Since15")
|
||||
@ -218,7 +218,16 @@ internal class JvmPluginClassLoaderN : URLClassLoader {
|
||||
this.sharedLibrariesLogger = ctx.sharedLibrariesLoader
|
||||
this.file = file
|
||||
this.ctx = ctx
|
||||
init0()
|
||||
init1()
|
||||
}
|
||||
|
||||
private fun init1() {
|
||||
try {
|
||||
init0()
|
||||
} catch (e: Throwable) {
|
||||
e.addSuppressed(RuntimeException("Failed to initialize new JvmPluginClassLoader, file=$file"))
|
||||
throw e
|
||||
}
|
||||
}
|
||||
|
||||
private fun init0() {
|
||||
|
Loading…
Reference in New Issue
Block a user