Conversation
supportHi, On error, it use error_log on line 260 and 262. I wish REPLACE with send_exception so i can catch error. I mean today it’s only in debug.log file. With exception i can easy use my already existing module to perform some actions like, logging error in database, sending email on error and some orther. If needed, i can send you my module. Thanks
Hello, what you mean by send_exception , I’ve never heard about such a function – it doesn’t exist in PHP neither in WP. I can imagine some do_action in there if you need to run some custom actions.
Sorry, i mean trigger_error https://www.php.net/manual/fr/function.trigger-error.php or throw new Exception( “custom message” ); And maybe return false or better return new WP_Error(“custom message”); when error occur. And check with is_wp_error on line 99 just before other tests. Because now your function return true every time, even it don’t work as expected. I wish something where i can know error occurs and then know what i can fix. Today was because of security settings of Imagick that doesnot allow pdf reading, and without anything on screen i cant know that. Thank you for reading
Hello, what you mean by send_exception , I’ve never heard about such a function – it doesn’t exist in PHP neither in WP. I can imagine some do_action in there if you need to run some custom actions.
Sorry, i mean trigger_error https://www.php.net/manual/fr/function.trigger-error.php or throw new Exception( “custom message” ); And maybe return false or better return new WP_Error(“custom message”); when error occur. And check with is_wp_error on line 99 just before other tests. Because now your function return true every time, even it don’t work as expected. I wish something where i can know error occurs and then know what i can fix. Today was because of security settings of Imagick that doesnot allow pdf reading, and without anything on screen i cant know that. Thank you for reading