Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trait ServingError{
- val code: Int
- val description: String
- }
- case class FatalError(override val code: Int = 1, exceptionCause: String) extends ServingError {
- override val description: String = s"Fatal Error code $code accrued"
- }
- case class InvalidRequestError(paramName: String, paramValue: String, override val code: Int = 2) extends ServingError{
- override val description: String = s"Invalid Request. Bad parameter: $paramName" + " " + s"with value: $paramValue"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement