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]
Last edited by StuXYZ; Jan 9th, 2009 at 7:02 pm.
Reputation Points: 732
Solved Threads: 134
Practically a Master Poster
Offline 659 posts
since Nov 2008