Skip to content

Instantly share code, notes, and snippets.

@yinyanghu
Created April 26, 2013 08:12
Show Gist options
  • Save yinyanghu/5465681 to your computer and use it in GitHub Desktop.
Save yinyanghu/5465681 to your computer and use it in GitHub Desktop.
Exception Handler in C++ Language
#include <iostream>
using namespace std;
int main()
{
try
{
throw(1);
int a = 1 / 0;
}
catch (int e)
{
cout << "Exception" << e << endl;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment