-
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.
- Loading branch information
Showing
2 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
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
21 changes: 21 additions & 0 deletions
21
src/main/scala/click/seichi/regenerateworld/presenter/shared/exception/ParseException.scala
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,21 @@ | ||
package click.seichi.regenerateworld.presenter.shared.exception | ||
|
||
import enumeratum.{Enum, EnumEntry} | ||
|
||
sealed abstract class ParseException(override val description: String) | ||
extends EnumEntry | ||
with OriginalException | ||
|
||
object ParseException extends Enum[ParseException] { | ||
override val values: IndexedSeq[ParseException] = findValues | ||
|
||
case object IsNotUuid extends ParseException("It is not UUID") | ||
|
||
case object MustBeLong extends ParseException("It must be Long") | ||
|
||
case object MustBeNaturalNumber extends ParseException("It must be natural number") | ||
|
||
case object MustBeDateTimeUnit extends ParseException("It must be DateTimeUnit") | ||
|
||
case object MustBeInterval extends ParseException("It must be Interval") | ||
} |