Show a more detailed error on Backend AJAX exceptions

This commit is contained in:
Sam Georges 2014-07-19 13:34:43 +10:00
parent bdf48611dd
commit 2b784392e8
2 changed files with 3 additions and 3 deletions

View File

@ -379,7 +379,7 @@ class Controller extends Extendable
return Response::make(Lang::get('backend::lang.model.mass_assignment_failed', ['attribute' => $ex->getMessage()]), 500);
}
catch (Exception $ex) {
return Response::make($ex->getMessage(), 500);
return Response::make(sprintf('"%s" on line %s of %s', $ex->getMessage(), $ex->getLine(), $ex->getFile()), 500);
}
}

View File

@ -8,7 +8,7 @@ use System\Classes\ApplicationException;
*
* Usage:
*
* In the model class definition:
* In the model class definition:
*
* public $implement = ['System.Behaviors.SettingsModel'];
* public $settingsCode = 'author_plugin_code';
@ -200,4 +200,4 @@ class SettingsModel extends ModelBehavior
{
return $this->fieldConfig;
}
}
}