a guest Oct 21st, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. trait ServingError{
  2.  val code: Int
  3.  val description: String
  4. }
  5. case class FatalError(override val code: Int = 1, exceptionCause: String) extends ServingError {
  6.  override val description: String =  s"Fatal Error code $code accrued"
  7. }
  8. case class InvalidRequestError(paramName: String, paramValue: String, override val code: Int = 2) extends ServingError{
  9.  override val description: String = s"Invalid Request. Bad parameter: $paramName" + " " + s"with value: $paramValue"
  10. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand