\myMVC_ErrorHandler

Generic error handler.

It supports displaying on browser and sending E-Mail to a configured address (see $config['ERROR']['ALERT'] in mymvc.php)

Summary

Methods
Properties
Constants
systemError()
sendAlert()
setExceptionCatcher()
setUserExceptionCatcher()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

systemError()

systemError(\Exception  $exception) 

Display an error on the browser

Parameters

\Exception $exception

sendAlert()

sendAlert(string  $msg, integer  $type = ALERT_CRITICAL) 

sends an alert to the configured E-Mail or Nagios server

Parameters

string $msg

Text to be sent

integer $type

Alert type (see mymvc.php). Default ALERT_CRITICAL

setExceptionCatcher()

setExceptionCatcher() 

Set the default catcher for uncatched exceptions

setUserExceptionCatcher()

setUserExceptionCatcher(string  $catcher) 

Set a user defined function (or class-method) for uncatched exception

Parameters

string $catcher

Function or method name. If method, then in the format class::method