Re: new IM driver for Image_Transform
| From: | Dan Allen | Date: | Sun, 26 May 2002 08:32:27 +0000 |
| Subject: | Re: new IM driver for Image_Transform | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-6422@lists.php.net to get a copy of this message | ||
Yes, you are right about only have to check for error if the exit is
negative....else the file is just unlinked. This is better than
ob_* since with ob_ there is no way to distinguish stderr from
stdout...like some people do
2>&1
which puts stderr into stdout, but then how do you tell which is
which if they get mixed in together...so yes, writing to a file is
the accepted way to capture is message.
Well, at the very least, let's do this...we don't have to do a ton
of error checking (or we could use a flag to ignore it) but what we
should do is if an error is encountered...then you raise a pear
error like I do in System/Command.php and that way you can do this:
if (Image_Transform::isError($return = $img->save('foo.gif'))) {
die($return->getMessage());
}
That's all I really request with that.
Don't worry about wars...I am not one to participate in them, I just
like to get my thoughts out there...I know that the reason we
contribute to PEAR is for the community, not for ourselves and
therefore the community will always be right...
Dan
--
________________________________________________________________
Daniel Allen, <dan@mojavelinux.com>
http://www.mojavelinux.com/
________________________________________________________________
Chaos reigns within.
Reflect, repent, and reboot. Order shall return.
________________________________________________________________