mirror of
https://github.com/ReVanced/revanced-patcher.git
synced 2026-01-20 09:53:55 +00:00
fix: Catch correct exception
This commit is contained in:
@@ -65,7 +65,7 @@ sealed class PatchBundleLoader private constructor(
|
|||||||
internal fun Class<*>.getInstance(logger: Logger): Patch<*>? {
|
internal fun Class<*>.getInstance(logger: Logger): Patch<*>? {
|
||||||
return try {
|
return try {
|
||||||
getField("INSTANCE").get(null)
|
getField("INSTANCE").get(null)
|
||||||
} catch (exception: NoSuchFileException) {
|
} catch (exception: NoSuchFieldException) {
|
||||||
logger.fine(
|
logger.fine(
|
||||||
"Patch class '${name}' has no INSTANCE field, therefor not a singleton. " +
|
"Patch class '${name}' has no INSTANCE field, therefor not a singleton. " +
|
||||||
"Will try to instantiate it."
|
"Will try to instantiate it."
|
||||||
|
|||||||
Reference in New Issue
Block a user