Skip to content

Instantly share code, notes, and snippets.

@asa55
Created April 3, 2020 20:55
Show Gist options
  • Save asa55/e0e16f1ba5b003f615f2c2d9bcab27b5 to your computer and use it in GitHub Desktop.
Save asa55/e0e16f1ba5b003f615f2c2d9bcab27b5 to your computer and use it in GitHub Desktop.
#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