Skip to content

Commit 919650f

Browse files
committed
style(sdk): format exceptions uniformly
1 parent e4aeeb0 commit 919650f

File tree

6 files changed

+22
-18
lines changed

6 files changed

+22
-18
lines changed
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package sc.api.plugins.exceptions
22

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

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

33
/** A [RescuableClientException] resulting from interacting with a GameRoom. */
4-
open class GameRoomException @JvmOverloads constructor(message: String, cause: Throwable? = null):
5-
RescuableClientException(message, cause)
4+
open class GameRoomException
5+
@JvmOverloads constructor(
6+
message: String,
7+
cause: Throwable? = null,
8+
): RescuableClientException(message, cause)

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@ package sc.api.plugins.exceptions
22

33
/** An Exception in Client-Server communication that should be handled. */
44
open class RescuableClientException
5-
@JvmOverloads constructor(override val message: String, cause: Throwable? = null):
6-
Exception(message, cause)
5+
@JvmOverloads constructor(
6+
override val message: String,
7+
cause: Throwable? = null,
8+
): Exception(message, cause)

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

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package sc.api.plugins.exceptions
2+
3+
class TooManyPlayersException: GameRoomException("This game is full already.")

0 commit comments

Comments
 (0)