Skip to content

Commit 686583d

Browse files
committed
refactor(sdk): convert RescuableClientExceptions to Kotlin and document them
1 parent cb4b31d commit 686583d

File tree

8 files changed

+22
-40
lines changed

8 files changed

+22
-40
lines changed

sdk/src/server-api/sc/api/plugins/exceptions/GameException.java

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package sc.api.plugins.exceptions
2+
3+
/** An exception concerning the Game within a GameRoom. */
4+
open class GameException @JvmOverloads constructor(message: String, cause: Throwable? = null):
5+
GameRoomException(message, cause)

sdk/src/server-api/sc/api/plugins/exceptions/GameLogicException.java

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package sc.api.plugins.exceptions
2+
3+
/** An exception within the flow of a Game. */
4+
open class GameLogicException @JvmOverloads constructor(message: String, cause: Throwable? = null):
5+
GameException(message, cause)

sdk/src/server-api/sc/api/plugins/exceptions/GameRoomException.java

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package sc.api.plugins.exceptions
2+
3+
/** A [RescuableClientException] resulting from interacting with a GameRoom. */
4+
open class GameRoomException @JvmOverloads constructor(message: String, cause: Throwable? = null):
5+
RescuableClientException(message, cause)

sdk/src/server-api/sc/api/plugins/exceptions/RescuableClientException.java

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package sc.api.plugins.exceptions
2+
3+
4+
/** An Exception in Client-Server communication that should be handled. */
5+
open class RescuableClientException
6+
@JvmOverloads constructor(override val message: String, cause: Throwable? = null):
7+
Exception(message, cause)

0 commit comments

Comments
 (0)