2 ms·
This doesn't seem like a significant difference to me. You can catch all throwables and handle them the same way. Ironically, it feels worse to ignore the add
by jayd16 8y ago
This doesn't seem like a significant difference to me. You can catch all throwables and handle them the same way. Ironically, it feels worse to ignore the added exception type information so it's rare to see errors handled generically this way.
- skybrian 8y agoWell, that's what I mean. You could sorta do it in Java, but people don't do it that way because there aren't consistent conventions and it feels wrong. But adding the extra type information exposes internal details and results in a backward-incompatible API change if you ever want to start throwing a new exception. Some people extend RuntimeException instead, which means you don't know whether a generic RuntimeException is recoverable or not. It's similar to how code formatting tools have been around a long time, but Go made their formatter standard, and that made all the difference. Conventions sometimes matter more than language features.