If the handler doesn't need to output anything (like sending an admin an
email) this won't work.


On Fri, Mar 28, 2014 at 11:07 AM, Steve Clay <notifications@github.com>wrote:

> In docs/examples/advanced/exceptions.php:
>
> > +	mail($email, $subject, $message);
> > +}
> > +
> > +
> > +// output a custom error page to match the theme or give a custom message
> > +$html = <<<HTML
> > +	<html>
> > +		<body>
> > +			Oops, a problem occurred.  The authorities have been notified.
> > +			Sorry for the inconvenience.
> > +		</body>
> > +	<html>
> > +HTML;
> > +
> > +echo $html;
> > +exit; // must exit out to prevent the default exception handler from rendering
>
> ob_start() before the require, then if there's data in the buffer, flush
> it and call exit.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/Elgg/Elgg/pull/6675/files#r11069744>
> .
>



-- 
Brett Profitt
Elgg Lead Developer

Elgg: http://elgg.org/
Skype: brett.profitt
Twitter: http://twitter.com/brettprofitt