in reply to Catching GD warning
use strict; use warnings; use GD; my $image; # $image = GD::Image->new($data) # If something goes wrong, this call will return undef. # so one could do : ($image = GD::Image->new("test.jpg")) or warn "Error: $!"; # or if (! ($image = GD::Image->new("test.jpg")) ) { print "my error handling\n"; } # eval trapping would work too...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Catching GD warning
by Marcello (Hermit) on May 03, 2006 at 14:59 UTC | |
by wazoox (Prior) on May 03, 2006 at 15:19 UTC |