If the message generator exists, it is called with 2 parameters.
the current Error Stack object
an array that is in the same format as an error. Available indices
are 'code', 'package', 'time', 'params',
'level', and 'context'
Next, if the error should contain context information, this is handled by the context
grabbing method. Finally, the error is pushed onto the proper error stack
Parameter
integer
$code
Package-specific error code
string
$level
Error level. This is NOT spell-checked
array
$params
associative array of error parameters
string
$msg
Error message, or a portion of it if the message
is to be generated
array
$repackage
If this error re-packages an error pushed by
another package, place the array returned from pop()
in this parameter
The errorData property of the exception class will be set to the array that would normally be
returned. If a PEAR_Error is returned, the userinfo property is set to the array