Exceptions


OMC_Exception

This is the parent class of all OMC Connector exceptions. To ensure that no other exceptions are risen when an OMC Connector call is made, it is sufficient to catch this exception.

OMC_ResourceInvalidException

This exception is risen if the server does not accept the parameters passed to it. This is the case, for example, if save() is called without having set all the mandatory fields.

OMC_ResourceNotFoundException

This corresponds to HTTP code 404. This exception is risen if the resource addressed is not present in the OMC.

OMC_UnauthorizedAccessException

This corresponds to HTTP code 401. This exception is risen if the specified user name is wrong, or if the API key does not correspond to the API key that has been specified in the OMC. See Installation and Configuration.

OMC_AuthenticationFailedException

This exception is risen when attempting to log-in with a nonexisting user name or with a password that does not match the passwort stored in the OMC for the person to which the login belongs (e.g. with OMC_Contact::authenticate(login, password);).

OMC_ErrorException

This exception is risen if an unexpected event occurs during communication with the OMC. It has two attributes, httpCode and responseBody.