Created
December 29, 2011 23:33
-
-
Save j5ik2o/1536703 to your computer and use it in GitHub Desktop.
例外を定義する便利なパターン
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
case class EntityNotFoundException(message: Option[String] = None, cause: Option[Throwable] = None) | |
extends Exception(message.orNull, cause.orNull) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
message.getOrElse(null)
は
と、微妙に短く書くこともできますよ| ω・`)