Skip to content

Commit

Permalink
refactor: custom error to sealed interface
Browse files Browse the repository at this point in the history
  • Loading branch information
GHGHGHKO committed Dec 19, 2022
1 parent 60c1eec commit c5b6656
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 23 deletions.

This file was deleted.

14 changes: 14 additions & 0 deletions src/main/kotlin/me/synology/memesapi/common/advice/Error.kt
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()

This file was deleted.

This file was deleted.

0 comments on commit c5b6656

Please sign in to comment.