Skip to content

Instantly share code, notes, and snippets.

@j2doll
Created March 19, 2018 10:11
Show Gist options
  • Select an option

  • Save j2doll/d97d77139652e4a2b7f04a053a3eddb6 to your computer and use it in GitHub Desktop.

Select an option

Save j2doll/d97d77139652e4a2b7f04a053a3eddb6 to your computer and use it in GitHub Desktop.
TestException
// 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