Can Case Classes Have Default Values and Implement Interfaces?
I'm looking at the Case Classes documentation and I was wondering if it is possible to have default values / implementations and/or to extend / implement an interface when using them?
This is what I had previously:
and this is how I used it to implement an error:
I really like the simplicity of case classes but it would be great to define a type for the common fields (
This is what I had previously:
and this is how I used it to implement an error:
I really like the simplicity of case classes but it would be great to define a type for the common fields (
message and debugMessage here), and to be able to provide default values like Failed to store job. Cause: ${cause}. Is this possible with case classes somehow? What's the best practice when creating error objects like this above?