php - Catch angular.js HTTP response JSON parse errors?
one text
Solution:
You could do the following:
set_error_handler("warning_handler", E_WARNING);
/// Run your code that throws the warning
// Wherever this is running Reminder::save($json);
restore_error_handler();
function warning_handler($errno, $errstr) {
// do something like log to a real place?
}
Source