No, there isn't any way. Try making all your exception classes derive from one single class, like std::exception
, and then catch that one.
You could rethrow in a nested try
, though, in an attempt to figure out the type. But then you could aswell use a previous catch clause (and ...
only as fall-back).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…