Should exceptions be chained in C++? [duplicate]
问题 This question already has an answer here: Proper/elegant way of implementing C++ exception chaining? 4 answers How to simulate inner exception in C++ 6 answers I just finished work on a C++-program where I've implemented my own exceptions (although derived from std::exception). The practice I've applied when one exception causes a chain reaction, propagating the error upwards and giving rise to other exceptions, is to concatenate the error message at each appropriate step across the modules