1

Why is it that nobody can seem to figure out you need a god forsaken "cause" field of type Error in your Error class

How is this so fucking hard to understand for language makers

Comments
  • 2
    What language are we talking about?
    Also, if you have classes, why not extend the basic error-type with a cause?
  • 0
    @metamourge Rust and JavaScript
  • 1
    I always do an abstract overload of the exception type, per project, with the messageless constructor unaccessible. Not only does this wind up causing compiler enforced error messages, but it also encourages a library specific exception tree, which makes handling more fine grained.
Add Comment