I'm trying to extend the Java exception class but if the result is very ugly and clumsy, I'm not sure I'm on the right track. Any better way to do this? parent_error (_d: double, msg: string, reason: throbble) exception is extracted (msg: string, reason: thrown) {dig it () = this (0, demand, empty ) DEF (0, MSG, empty) DEF (MS: string, reason: throw) this (D, empty) def (D, empty, empty) DEF = (0, msg, reason) DF (reason: thrrowable) = This (0, empty, reason) DEF I = _d} case class hair error (_b: boolean, _i: double, msg: string, reason: throw) it (b, 0, empty, empty) DEF (msg: string ) = This ( Note (false, 0, empty, reason) Def B = _b} Note (false, 0, message, reason) DEF (Reason: Throwable) : I looked, but I do not think I'm looking for it. Thanks
Use default values , For example:
class ParentError I: double = 0, msg: string = zero, reason: throbble = empty) exception is expanded (msg: string, reason: throbbing) {single ??}}
No comments:
Post a Comment