Improved AJAX error handling.

This commit is contained in:
Alex Tselegidis 2016-01-09 22:55:07 +01:00
parent a770a69660
commit e252307e66
2 changed files with 4 additions and 4 deletions

View file

@ -346,7 +346,7 @@ var GeneralFunctions = {
ajaxFailureHandler: function(jqxhr, textStatus, errorThrown) { ajaxFailureHandler: function(jqxhr, textStatus, errorThrown) {
var exceptions = [ var exceptions = [
{ {
message: 'AJAX Error: ' + textStatus message: 'AJAX Error: ' + errorThrown
} }
]; ];

View file

@ -61,12 +61,12 @@ if (defined('ENVIRONMENT'))
{ {
case 'development': case 'development':
error_reporting(E_ALL); error_reporting(E_ALL);
break; ini_set('display_errors', 1);
break;
case 'testing':
case 'production': case 'production':
error_reporting(0); error_reporting(0);
break; break;
default: default:
exit('The application environment is not set correctly.'); exit('The application environment is not set correctly.');