/** * Throws a XOAD callback exception. * * @access protected * * @param string $message Exception message. * * @return string Outputs JavaString code that contains the * exception message. * * @static * */ public static function throwException($message) { if (!XOAD_Server::notifyObservers('throwExceptionEnter', array('message' => &$message))) { return false; } restore_error_handler(); $callbackException = array(); $callbackException['exception'] = $message; if (XOAD_Server::notifyObservers('throwExceptionLeave', array('message' => &$message))) { print XOAD_Client::register($callbackException); } return true; }