Exceptions cannot be caught - always stops execution
Posted: 2007-03-24T02:22:59-07:00
Hi,
Ok, so I've spent the past 3 hours banging my head against a brick wall. I hope someone out there can help. I'm using ImageMagick 6.0.7 with the PerlMagick API on Linux ES4.
I'm trying to catch any exceptions encountered during the following operation:
HOWEVER, perl simply stops and gives me the error, 'Exception 410: unrecognized option 'badparameter' at ..., without ever getting to the print statement.
I've tried using eval, to no avail. Also, BTW, prior to calling Annotate(), I construct the image as follows (without problems) in case it matters:
Does anyone have *any* idea what's going on? Is there a special setting I need to set so that ImageMagick/PerlMagick will behave as stated in the documentation?
Thanks in advance!
Ok, so I've spent the past 3 hours banging my head against a brick wall. I hope someone out there can help. I'm using ImageMagick 6.0.7 with the PerlMagick API on Linux ES4.
I'm trying to catch any exceptions encountered during the following operation:
Code: Select all
my $err = $image->Annotate(x=>20, y=>39, fill=>"#330000", font=>"VAGRound", badparameter=>'233', text=>'Hello');
print "Exception: $err \n";
I've tried using eval, to no avail. Also, BTW, prior to calling Annotate(), I construct the image as follows (without problems) in case it matters:
Code: Select all
my $image = Image::Magick->new(magick=>'gif');
$image->BlobToImage($img);
Thanks in advance!