14using namespace Magick;
16int main(
int ,
char ** argv)
19 InitializeMagick(*argv);
21 volatile int failures=0;
23 cout <<
"Checking for working exceptions (may crash) ... ";
42 cout <<
"Throwing 'Magick::WarningResourceLimit' exception" << endl;
48 cout <<
"Successfully caught 'Magick::WarningResourceLimit' exception" << endl;
59 Color canvasColor(
"red" );
60 Image image( geometry, canvasColor);
66 cout <<
"Throwing library 'Magick::Exception' exception" << endl;
72 cout <<
"Successfully caught library 'Magick::Exception' exception" << endl;
81 cout <<
"Bogus catch: Caught exception: " << error_.what() << endl;
85 catch( exception &error_ )
87 cout <<
"Bogus catch: Caught exception: " << error_.what() << endl;
94 cout << failures <<
" failures" << endl;
98 cout <<
"Exception testing passed!" << endl;