]> Creatis software - gdcm.git/blob - Testing/ExceptionAndPython/foo_main.cxx.simpler
Fix mistypings
[gdcm.git] / Testing / ExceptionAndPython / foo_main.cxx.simpler
1 #include <iostream>
2
3 struct MyException {
4    MyException() { std::cout << "In exception" << std::endl; }
5 };
6
7 void Thrower(void) {
8    throw MyException();
9 }
10
11 void MyWrappedFunction(void) {
12    try { Thrower(); }
13    catch (MyException){ std::cout<<"Exception caught in caller"<<std::endl; }
14 }
15
16 int main() {
17    MyWrappedFunction();
18   return 0;
19 }
20