Created
June 9, 2011 15:34
-
-
Save schmir/1016993 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <exception> | |
#include <iostream> | |
class fopen_failed: public std::exception | |
{ | |
public: | |
const char *what() const throw() { | |
return "fopen failed"; | |
} | |
}; | |
int main() | |
{ | |
try { | |
throw fopen_failed(); | |
} catch (...) { | |
}; | |
std::cout << "good\n"; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment