0

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!

valicu2000
  • 441
  • 5
  • 19
  • 500? Have a look here http://stackoverflow.com/a/2146171/1301076 – rjdown Mar 04 '15 at 17:23
  • What PHP function are you using to retrieve the product feeds? – MegaAppBear Mar 04 '15 at 17:51
  • @ amrhady: I'm using custom made functions, it will take too much space to paste them here. Usually they work, but there are moments when the server load is high and the scripts are dumped. – valicu2000 Mar 04 '15 at 18:03

0 Answers0