• Object Storage Service

obs
  1. Help Center
  2. Object Storage Service
  3. Developer Guide (PHP SDK)
  4. Troubleshooting
  5. SDK Custom Exceptions

SDK Custom Exceptions

SDK custom exceptions (Obs\Common\ObsException), thrown by ObsClient, are inherited from class \RuntimeException. Exceptions are usually OBS server errors, including OBS error codes and error information. This facilitates users to locate problems and troubleshot faults.

Obs\Common\ObsException contains the following error information:

  • ObsException->getStatusCode: HTTP status code
  • ObsException->getExceptionCode: Error code returned by the OBS server
  • ObsException->getExceptionMessage: Error description returned by the OBS server
  • ObsException->getRequestId: Request ID returned by the OBS server
  • ObsException->getHostId: Requested server ID.
  • ObsException->getResponse: HTTP response object
  • ObsException->getRequest: HTTP request object