Ajax Call Exceptions Display Web Page Content in Javascript Console
Notice: This thread is very old.
- dqj
- Member | 11
My Nette app is an API for use by Angular, so all uses on the server side of my app are AJAX service calls. Unfortunately, if there is an error, a web page is sent to the ajax calling routine.
Is there a way to override the default handling and present the exception as json data in the output?
- dqj
- Member | 11
Thank you. I haven't been able to get the ErrorPresenter class to engage, somehow. It seems to work if I do not set enableDebugger(), but then it raises a whole new set of problems too difficult to untangle. It is going to be too much to take on until I understand Nette better.
Last edited by dqj (2015-10-18 18:41)
- David Matějka
- Moderator | 6445
In the debug mode, Nette does not use ErrorPresenter by default, but you can enable it to test its funcionality.
config.neon: