case classServiceException(message: String, code: Int = 1) extends RuntimeException with Product with Serializable
ServiceException is a simple wrapper around RuntimeException, but when thrown by a Service method the message will be
sent back in the response JSON. If any other exception is fired the details of the message will be hidden from the
client. Only use this if you want the client to be able to read an explicit error message.
message
represents the message that will be sent back to the client
code
represents the error code that will be sent back to the client (defaults to -1)
Linear Supertypes
Serializable, Product, Equals, RuntimeException, Exception, Throwable, Serializable, AnyRef, Any
ServiceException is a simple wrapper around RuntimeException, but when thrown by a Service method the message will be sent back in the response JSON. If any other exception is fired the details of the message will be hidden from the client. Only use this if you want the client to be able to read an explicit error message.
represents the message that will be sent back to the client
represents the error code that will be sent back to the client (defaults to -1)