I have some php scripts for importing product feeds into a website. Sometimes those scripts crash (due to the "500 Internal Server Error", I believe) and I need to send a notification through e-mail.
Will it be sufficient to add a try catch
to the existing code? Something like:
try {
[existing_code]
}
catch (customException $e) {
echo $e->errorMessage();
[e-mail_the_error]
}
Many thanks!