mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
Show a more detailed error on Backend AJAX exceptions
This commit is contained in:
parent
bdf48611dd
commit
2b784392e8
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user