Previous changes allowed BBHandledException to be detected but not exceptions
which inherit from it. Fix this. The code really needs totally reworking
to preserve the exceptions.
[YOCTO #14054]
(Bitbake rev: ef762d92df6c2554c6248e80212f984d9ec4c651)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>