0
I have a question about code :
class SaldoInsuficienteException(mensagem:String = "O saldo é Insuficiente") : Exception(mensagem)
Now I tested imagining how the code was written in English and the variable equals the property of the Exception itself in the case "message", I could overwrite (Override).
class SaldoInsuficienteException(override val message :String = "O saldo é Insuficiente") : Exception()
It would also work , but I didn’t understand why of this, and if you count by the Override "val " that it could be " var " and still it would work and could change where you play the Exception being val or var . Because that?
I hope you help me please !