
Untitled
By: a guest on
Dec 29th, 2012 | syntax:
C++ | size: 0.50 KB | hits: 27 | expires: Never
#include <iostream>
#include <Poco/Exception.h>
int main(int argc, char **argv)
{
//*
cout << "Testing throwing/catching Poco Exception" << endl;
try {
throw Poco::Exception("test");
} catch(Poco::Exception &exc) {
cout << "caught" << endl;
}
//*/
cout << "Testing throwing/catching std exception" << endl;
try {
throw std::exception();
} catch(std::exception &exc) {
cout << "caught" << endl;
}
return 0;
}