Re:Where Everything Went Wrong: Error Handling and Error Mes...
by simiones on Friday February 19, 2021 @07:56AM
(#26192621)
To be fair, throw is GOTO. Catch() is COMEFROM :).
[ Parent
| on HN ]
Re:Where Everything Went Wrong: Error Handling and Error Mes...
by carapace on Friday February 19, 2021 @01:32PM
(#26196278)
Ah, my peeps! I love you guys.
enriquto when you talk about "a language with no error handling nor exceptions" it reminds me of a crazy idea i was toying with: what if you made all "exceptions" require handlers, e.g. what if every divide had to be accompanied by code to deal with divide-by-zero? In other words, DIV(X, Y, Foo) would be (X/Y if Y != 0 else Foo()) And so on...
Re:Where Everything Went Wrong: Error Handling and Error Mes...
by heja2009 on Friday February 19, 2021 @04:16PM
(#26198128)
that's the way some embedded control systems are designed. with some (many) errors (can't read/write) being fatal and shutting down the system after an alarm is sent.
Re:Where Everything Went Wrong: Error Handling and Error Mes...
by Ace17 on Friday February 19, 2021 @01:22PM
(#26196157)
Technically, `throw` is `goto somewhere`.
Re:Where Everything Went Wrong: Error Handling and Error Mes...
by marcosdumay on Friday February 19, 2021 @02:34PM
(#26197058)
I guess gettout wasn't well accepted by the committees of the time.