SHARE
TWEET

Untitled

a guest Dec 29th, 2012 29 Never
  1. #include <iostream>
  2.  
  3. #include <Poco/Exception.h>
  4.  
  5. int main(int argc, char **argv)
  6. {
  7.     //*
  8.     cout << "Testing throwing/catching Poco Exception" << endl;
  9.     try {
  10.         throw Poco::Exception("test");
  11.     } catch(Poco::Exception &exc) {
  12.         cout << "caught" << endl;
  13.     }
  14.     //*/
  15.  
  16.     cout << "Testing throwing/catching std exception" << endl;
  17.     try {
  18.         throw std::exception();
  19.     } catch(std::exception &exc) {
  20.         cout << "caught" << endl;
  21.     }
  22.  
  23.     return 0;
  24. }
RAW Paste Data
Top