Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement