This isn't something simple, i.e. that you output nothing in what() and
then you are double throwing the exception.
You are always going to get
terminate called after throwing an instance of 'std::exception'
what(): std::exception
with this code, it is just a question of what you are going to get first.
you can test that by getting rid of the throw e; (on the second catch) and replacing it with exit(1) [if you need to exit]
StuXYZ
Practically a Master Poster
680 posts since Nov 2008
Reputation Points: 760
Solved Threads: 138