Advertisement
Guest User

Untitled

a guest
Dec 29th, 2012
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement