Browse Source

Remove MPP EventCancelledException

Him188 5 years ago
parent
commit
72fb82c01f

+ 5 - 5
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/BotEvents.kt

@@ -34,11 +34,11 @@ import kotlin.jvm.JvmSynthetic
 
 
 @Suppress("unused")
-expect class EventCancelledException : RuntimeException {
-    constructor()
-    constructor(message: String?)
-    constructor(message: String?, cause: Throwable?)
-    constructor(cause: Throwable?)
+class EventCancelledException : RuntimeException {
+    constructor() : super()
+    constructor(message: String?) : super(message)
+    constructor(message: String?, cause: Throwable?) : super(message, cause)
+    constructor(cause: Throwable?) : super(cause)
 }
 
 // note: 若你使用 IntelliJ IDEA, 按 alt + 7 可打开结构

+ 0 - 12
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/event/events/EventCancelledException.kt

@@ -1,12 +0,0 @@
-package net.mamoe.mirai.event.events
-
-
-// 不要删除多平台结构.
-// 否则在 Java 中这个 class 不会被认为是 java.lang.RuntimeException (Kotlin bug)
-@Suppress("unused")
-actual class EventCancelledException : RuntimeException {
-    actual constructor() : super()
-    actual constructor(message: String?) : super(message)
-    actual constructor(message: String?, cause: Throwable?) : super(message, cause)
-    actual constructor(cause: Throwable?) : super(cause)
-}