language: C++ 4.7.2 (gcc-4.7.2)
date: 131 days 2 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <iostream>
using namespace std;
 
int main ()
{
    cin.exceptions(ios::failbit);
    int foo;
    try
    {
        cin >> foo;
    }
    catch (const exception& e)
    {
        cerr << "Exception occured." << e.what() << '\n';
        return 0;
    }
    cout << "Should not output this";
}