How do I catch an imagick fatal error in PHP
问题 i am using imagick to create thumbnails for pdf documents. i get a fatal error on this line.. $imagick->readImage($file .'[0]'); I tried wrapping in a try catch but as i learned that doesn't work because it's a fatal error, not an exception. How would I gracefully catch this error? I am more concerned about using PHP to detect the error than solving the imagick problem, since any number of errors might come up with user pdf files. thanks! 回答1: Unfortunately it's not possible to catch fatal