You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 3, 2022. It is now read-only.
linusnorton edited this page Dec 30, 2011
·
1 revision
The exception handler uses the observer pattern to allow objects to be notified of exceptions.
The exception mailer can be attached to the exception handler so that it sends an email every time an error or exception occurs.
/**
* Set up error emailing
*/
public function init() {
parent::init();
$recipient = $this->dic->registry->get("ADMIN");
$mailer = new \xframe\exception\Mailer($recipient);
$this->dic->exceptionHandler->attach($mailer);
}