I tested it with syntax error and throwing errors and warnings before calling ```exit()``` and inside a ```onEndRequest()```, with and without yii debug on.  All worked as expected and showed errors or debug info.