- // This hook allows last minute changes to final overall output by modifying output buffer
- Hooks::run( 'AfterFinalPageOutput', [ $this ] );
+ try {
+ // This hook allows last minute changes to final overall output by modifying output buffer
+ Hooks::run( 'AfterFinalPageOutput', [ $this ] );
+ } catch ( Exception $e ) {
+ ob_end_clean(); // bug T129657
+ throw $e;
+ }