Hi,

I've been using $.get() and $.post() extensively, but then noticed teh
more functional $.ajax, which lets you handle server-side errors using
the "error" option.

The parameters to the callback function for the error option are:
(xhr, status, exception), where in the documentation it says
"exception" is the Exception object if it's supplied.

My server-side is PHP, and when I perform a:
     throw new Exception("You can't do that!")
or
     trigger_error("You can't do that!", E_USER_ERROR)

it does run my error callback, but it puts 'undefined' in the
"exception" object, and my custom error message is nowhere to be
found.

So the question is, how do I populate that Exception object on the
server side, so that the error callback can then access it?

Thanks,
Jamie

Reply via email to