Ignoring the error will not be big. TCPDF, when asked to use a non-existent image, simply "die ()", printing an error on the screen. This means that it is outside my application exception and error handling system.
Thanks for the question and the proposed solution. I am going to use this in my Symfony2 project. This causes any TCPDF problems to raise an exception that must be handled by the infrastructure, because TCPDF does not throw exceptions on its own. I use it in conjunction with the WhiteOctober Symfony2 package, which allows you to extend the TCPDF class this way.
namespace Acme\MyBundle\ClassExtensions; class ExceptionThrowingTCPDF extends \TCPDF { public function Error($msg) {
source share