Created
April 3, 2020 20:55
-
-
Save asa55/e0e16f1ba5b003f615f2c2d9bcab27b5 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 <iostream> | |
#include <string> | |
using String = std::string; | |
int main () { | |
try { | |
String my_str = "Yikes"; | |
throw my_str; | |
} | |
catch (String e) { | |
std::cout | |
<< "Int exception thrown " | |
<< e | |
<< std::endl; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment