-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat except message format
- Loading branch information
Showing
17 changed files
with
130 additions
and
55 deletions.
There are no files selected for viewing
5 changes: 0 additions & 5 deletions
5
.../src/main/kotlin/tw/waterballsa/gaas/application/exceptions/GameAlreadyExistsException.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 23 additions & 10 deletions
33
domain/src/main/kotlin/tw/waterballsa/gaas/exceptions/NotFoundException.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 6 additions & 1 deletion
7
domain/src/main/kotlin/tw/waterballsa/gaas/exceptions/PlatformException.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
package tw.waterballsa.gaas.exceptions | ||
|
||
open class PlatformException(message: String) : RuntimeException(message) | ||
import tw.waterballsa.gaas.exceptions.enums.PlatformError | ||
|
||
open class PlatformException( | ||
val platformError: PlatformError, | ||
message: String, | ||
) : RuntimeException(message) |
29 changes: 29 additions & 0 deletions
29
domain/src/main/kotlin/tw/waterballsa/gaas/exceptions/enums/PlatformError.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package tw.waterballsa.gaas.exceptions.enums | ||
|
||
enum class PlatformError( | ||
val code: String, | ||
) { | ||
|
||
CLIENT_INVALID("C001"), | ||
CLIENT_AUTHORIZATION_INVALID("C002"), | ||
|
||
JWT_ERROR("J001"), | ||
JWT_NOT_FOUND("J002"), | ||
|
||
GAME_NOT_FOUND("G001"), | ||
GAME_EXISTS("G002"), | ||
GAME_CREATE_ERROR("G003"), | ||
|
||
USER_NOT_FOUND("U001"), | ||
USER_INPUT_INVALID("U002"), | ||
USER_NAME_DUPLICATED("U003"), | ||
|
||
ROOM_NOT_FOUND("R001"), | ||
ROOM_PASSWORD_INCORRECT("R002"), | ||
ROOM_FULL("R003"), | ||
|
||
PLAYER_NOT_FOUND("P001"), | ||
PLAYER_NOT_HOST("P002"), | ||
PLAYER_JOIN_ROOM_ERROR("P003"), | ||
PLAYER_CREATE_ROOM_ERROR("P004"), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.