Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
breadwinner
2y ago
0 comments
Share
Not true. Exception hierarchies solve this problem.
0 comments
default
newest
oldest
nradov
2y ago
Nope. Exception hierarchies don't even come close to solving that problem because the superclass or interface author usually didn't anticipate your need and define the method signature in a way that would be useful with exception hierarchies.
breadwinner
OP
2y ago
So you're inheriting a class not within your own application, but written outside of your application. Composition might work better in this case.
nradov
2y ago
Nope. Composition doesn't help when you have to implement an existing interface in order to make some API work.
1 more reply
j
/
k
navigate · click thread line to collapse