to show how to catch exception in C++