-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: custom error to sealed interface
- Loading branch information
Showing
4 changed files
with
14 additions
and
23 deletions.
There are no files selected for viewing
7 changes: 0 additions & 7 deletions
7
src/main/kotlin/me/synology/memesapi/common/advice/EmailSignInFailedExceptionCustom.kt
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
src/main/kotlin/me/synology/memesapi/common/advice/Error.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,14 @@ | ||
package me.synology.memesapi.common.advice | ||
|
||
sealed interface Error | ||
|
||
sealed class IOError : Error, RuntimeException { | ||
|
||
constructor(message: String, throwable: Throwable): super(message, throwable) | ||
constructor(message: String): super(message) | ||
constructor(): super() | ||
} | ||
|
||
class EmailSignInFailedExceptionCustom : IOError() | ||
class UserExistExceptionCustom : IOError() | ||
class UserNotFoundExceptionCustom : IOError() |
8 changes: 0 additions & 8 deletions
8
src/main/kotlin/me/synology/memesapi/common/advice/UserExistExceptionCustom.kt
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
src/main/kotlin/me/synology/memesapi/common/advice/UserNotFoundExceptionCustom.kt
This file was deleted.
Oops, something went wrong.