Created
March 19, 2018 10:11
-
-
Save j2doll/d97d77139652e4a2b7f04a053a3eddb6 to your computer and use it in GitHub Desktop.
TestException
This file contains hidden or 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
| // testException.cpp | |
| #include "StreamingException.h" | |
| int main (int argc, char * const argv[]) | |
| { | |
| try | |
| { | |
| if (5 != 3) | |
| throw StreamingException() << 5 << " is not equal to " << 3; | |
| } | |
| catch (const StreamingException & e) | |
| { | |
| cout << e.what() << endl; | |
| } | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment