Oberto / php-image-magician

Image manipulation at it's finest.
http://phpimagemagician.jarrodoberto.com
91 stars 54 forks source link

die #5

Open nikosch opened 11 years ago

nikosch commented 11 years ago

It would be nice, if you'd prelace all die(notice) commands by another error mechanism. E.g. trigger error, return false or exceptions. Using die makes it impossible, to handle errors in image processing. Not all processes are standalone scripts.

Oberto commented 11 years ago

die should only be triggered if you have the debug flag enabled (which I think is enabled by default).

However, you're right. Die is a little archaic and should be replaced with exceptions. ...and maybe debug should be defaulted to false - but then I'd get a tonne of emails when scripts fail silently and no one knows why :P