yiisoft/yii — pull request #2836 by Darkheir (2013-08-30 17:27:53+00:00)
Title: Handle thrown exception in widgets when 'captureOutput' is set to true.

When a Widget throws an Exception and the option `captureOutput` is set to `true` it messes up the rendering of the view.

In this pull request I catch the exception, flush the output buffer, turn off output buffering (using `ob_end_flush()`) and then throw the exception to the upper level.