Imagine ライブラリを使用して例外を正しく管理していないと思います。
私のコードは次のとおりです。
use ....
use Imagine\Exception;
....
try {
$imagine = new Imagine();
$image = $imagine->open($img_path . DS . "tmpfile." . $extension)
->resize(new Box($cwidth, $cheight))
->crop(new Point($offsetx, $offsety), new Box(500, 500));
...
} catch (Imagine\Exception\Exception $e) {
die("catch Imagine\Exception\Exception");
$file = new File($img_path . DS . "tmpfile." . $extension);
if ($file->exists()) {
$file->delete();
}
}
しかし、Imagine Exception では、それをキャッチできず、スクリプトが停止します。
私の間違いはどこですか?