original_string: private static function applicationErrorToException($error) {
      switch($error->getApplicationError()) {
        case ErrorCode::URL_TOO_LONG:
          $result = new \InvalidArgumentException(
              'The upload URL supplied was too long.');
          break;
        case ErrorCode::PERMISSION_DENIED:
          $result = new CloudStorageException('Permission Denied');
          break;
        case ErrorCode::ARGUMENT_OUT_OF_RANGE:
          $result = new \InvalidArgumentException($error->getMessage());
          break;
        default:
          $result = new CloudStorageException(
              'Error Code: ' . $error->getApplicationError());
      }
      return $result;
    }
code: private static function applicationErrorToException($error) {
      switch($error->getApplicationError()) {
        case ErrorCode::URL_TOO_LONG:
          $result = new \InvalidArgumentException(
              'The upload URL supplied was too long.');
          break;
        case ErrorCode::PERMISSION_DENIED:
          $result = new CloudStorageException('Permission Denied');
          break;
        case ErrorCode::ARGUMENT_OUT_OF_RANGE:
          $result = new \InvalidArgumentException($error->getMessage());
          break;
        default:
          $result = new CloudStorageException(
              'Error Code: ' . $error->getApplicationError());
      }
      return $result;
    }
code_tokens: private static function applicationErrorToException ( $ error ) { switch ( $ error -> getApplicationError ( ) ) { case ErrorCode :: URL_TOO_LONG : $ result = new \ InvalidArgumentException ( 'The upload URL supplied was too long.' ) ; break ; case ErrorCode :: PERMISSION_DENIED : $ result = new CloudStorageException ( 'Permission Denied' ) ; break ; case ErrorCode :: ARGUMENT_OUT_OF_RANGE : $ result = new \ InvalidArgumentException ( $ error -> getMessage ( ) ) ; break ; default : $ result = new CloudStorageException ( 'Error Code: ' . $ error -> getApplicationError ( ) ) ; } return $ result ; }
docstring: Convert an BlobstoreServiceError returned from an RPC call to an
  exception.
  
  @param int $error A BlobstoreServiceError::ErrorCode error value.
  
  @return Exception The exception that corresponds to the error code.
  
  @access private
docstring_tokens: Convert an BlobstoreServiceError returned from an RPC call to an exception .