Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Mirai
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Mirai
Commits
f989cd93
Commit
f989cd93
authored
Feb 15, 2020
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Multiplatform Exceptions to deal with kotlin bug
parent
5eb731e9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
0 deletions
+39
-0
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/contact/PermissionDeniedException.kt
...tlin/net/mamoe/mirai/contact/PermissionDeniedException.kt
+9
-0
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/event/events/EventCancelledException.kt
...n/net/mamoe/mirai/event/events/EventCancelledException.kt
+9
-0
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/PermissionDeniedException.kt
...tlin/net/mamoe/mirai/contact/PermissionDeniedException.kt
+9
-0
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/event/events/EventCancelledException.kt
...n/net/mamoe/mirai/event/events/EventCancelledException.kt
+12
-0
No files found.
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/contact/PermissionDeniedException.kt
0 → 100644
View file @
f989cd93
package
net.mamoe.mirai.contact
/**
* 权限不足
*/
actual
class
PermissionDeniedException
:
IllegalStateException
{
actual
constructor
()
:
super
(
"Permission denied"
)
actual
constructor
(
message
:
String
?)
:
super
(
message
)
}
\ No newline at end of file
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/event/events/EventCancelledException.kt
0 → 100644
View file @
f989cd93
package
net.mamoe.mirai.event.events
@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
)
}
\ No newline at end of file
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/PermissionDeniedException.kt
0 → 100644
View file @
f989cd93
package
net.mamoe.mirai.contact
/**
* 权限不足
*/
// 不要删除多平台结构
actual
class
PermissionDeniedException
:
IllegalStateException
{
actual
constructor
()
:
super
(
"Permission denied"
)
actual
constructor
(
message
:
String
?)
:
super
(
message
)
}
\ No newline at end of file
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/event/events/EventCancelledException.kt
0 → 100644
View file @
f989cd93
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
)
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment