I am trying to debug a page that sends emails with attachments via ajax and when PHP kicks out an error, I get "Parse Error" because the error is not being sent back via JSON. Is there anyway to wrap up the PHP errors so I can alert them and see exactly what PHP errors are coming up?
What I am hoping to see in the js alert is the same thing you would see printed on the screen if this form was not submitted using ajax.