Back to index

d-push  2.0
Public Member Functions | Protected Attributes
MAPIException Class Reference

MAPIException if enabled using mapi_enable_exceptions then php-ext can throw exceptions when any error occurs in mapi calls. More...

Inheritance diagram for MAPIException:
Inheritance graph
[legend]
Collaboration diagram for MAPIException:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 getDisplayMessage ()
 Function will return display message of exception if its set by the calle.
 ZPushException ($message="", $code=0, $previous=NULL, $logLevel=false)
 getHTTPCodeString ()
 getHTTPHeaders ()
 showLegalNotice ()

Protected Attributes

 $defaultLogLevel = LOGLEVEL_FATAL
 $httpReturnCode = HTTP_CODE_500
 $httpReturnMessage = "Internal Server Error"
 $httpHeaders = array()
 $showLegal = true

Detailed Description

MAPIException if enabled using mapi_enable_exceptions then php-ext can throw exceptions when any error occurs in mapi calls.

this exception will only be thrown when severity bit is set in error code that means it will be thrown only for mapi errors not for mapi warnings.

Definition at line 59 of file class.mapiexception.php.


Member Function Documentation

Function will return display message of exception if its set by the calle.

if it is not set then we are generating some default display messages based on mapi error code.

Returns:
string returns error-message that should be sent to client to display.

Definition at line 67 of file class.mapiexception.php.

        {
            if(!empty($this->displayMessage))
                return $this->displayMessage;

            switch($this->getCode())
            {
                case MAPI_E_NO_ACCESS:
                    return _("You have insufficient privileges to open this object.");
                case MAPI_E_LOGON_FAILED:
                case MAPI_E_UNCONFIGURED:
                    return _("Logon Failed. Please check your username/password.");
                case MAPI_E_NETWORK_ERROR:
                    return _("Can not connect to Zarafa server.");
                case MAPI_E_UNKNOWN_ENTRYID:
                    return _("Can not open object with provided id.");
                case MAPI_E_NO_RECIPIENTS:
                    return _("There are no recipients in the message.");
                case MAPI_E_NOT_FOUND:
                    return _("Can not find object.");
                case MAPI_E_INTERFACE_NOT_SUPPORTED:
                case MAPI_E_INVALID_PARAMETER:
                case MAPI_E_INVALID_ENTRYID:
                case MAPI_E_INVALID_OBJECT:
                case MAPI_E_TOO_COMPLEX:
                case MAPI_E_CORRUPT_DATA:
                case MAPI_E_END_OF_SESSION:
                case MAPI_E_AMBIGUOUS_RECIP:
                case MAPI_E_COLLISION:
                case MAPI_E_UNCONFIGURED:
                default :
                    return sprintf(_("Unknown MAPI Error: %s"), get_mapi_error_name($this->getCode()));
            }
        }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 62 of file zpushexception.php.

                                        {
        return $this->httpReturnCode . " ". $this->httpReturnMessage;
    }

Definition at line 66 of file zpushexception.php.

                                     {
        return $this->httpHeaders;
    }

Definition at line 70 of file zpushexception.php.

                                      {
        return $this->showLegal;
    }
ZPushException::ZPushException ( message = "",
code = 0,
previous = NULL,
logLevel = false 
) [inherited]

Definition at line 51 of file zpushexception.php.

                                                                                                  {
        if (! $message)
            $message = $this->httpReturnMessage;

        if (!$logLevel)
            $logLevel = $this->defaultLogLevel;

        ZLog::Write($logLevel, get_class($this) .': '. $message . ' - code: '.$code);
        parent::__construct($message, (int) $code);
    }

Here is the call graph for this function:


Member Data Documentation

ZPushException::$httpHeaders = array() [protected, inherited]

Reimplemented in AuthenticationRequiredException.

Definition at line 48 of file zpushexception.php.

Reimplemented in ProvisioningRequiredException, and AuthenticationRequiredException.

Definition at line 46 of file zpushexception.php.

ZPushException::$httpReturnMessage = "Internal Server Error" [protected, inherited]

Reimplemented in ProvisioningRequiredException, and AuthenticationRequiredException.

Definition at line 47 of file zpushexception.php.

ZPushException::$showLegal = true [protected, inherited]

Reimplemented in AuthenticationRequiredException, and HTTPReturnCodeException.

Definition at line 49 of file zpushexception.php.


The documentation for this class was generated from the following file: