Precisely!
And on top of it, you can do it at verious stages of your execution (aka layers). Some errors may have to be dealt with in lower levels (nearer to, says, system 'layer') and thus not visible to upper layers that shouldn't really be concerned with certain details.
isa() calls is certainly a great way to approach this.
It is also much more clearer than dealing with static die strings ($@). Certainly, static strings, by their nature, do not allow for the complexity (i should rather say, flexibility) that OO offers.
On the other hand, it may be more justifiable to actually not use OO-ish excpetion handling methods in simple code and therefore avoid going through the 'extra hoops' in order to yield no noticable reward.
"There is no system but GNU, and Linux is one of its kernels." -- Confession of Faith
|
| [reply] |