Handling PHP exceptions with JQuery
- by Itamar Bar-Lev
Hello,
I'm using JQuery to call a PHP function that returns a JSON string upon success or throws some exceptions. Currently I'm calling jQuery.parseJSON() on the response and if it fails I assume the response contains an exception string.
$.ajax({
type: "POST",
url: "something.php",
success:…