Services_GeoNames
[ class tree: Services_GeoNames ] [ index: Services_GeoNames ] [ all elements ]

Class: Services_GeoNames_HTTPException

Source Location: /Services_GeoNames-1.0.1/Services/GeoNames/Exception.php

Class Overview

PEAR_Exception
   |
   --Services_GeoNames_Exception
      |
      --Services_GeoNames_HTTPException

Class for HTTP exceptions raised by the Services_GeoNames package.


Author(s):

Version:

  • Release: 1.0.1

Copyright:

  • 2008-2009 David Jean Louis

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 75]
Class for HTTP exceptions raised by the Services_GeoNames package.

This specific exception allows the user to retrieve the error response returned by the server, for example:

  1.  try {
  2.      $geonames = new Services_GeoNames();
  3.      $geonames->someMethod();
  4.  catch (Services_GeoNames_HTTPException $exc{
  5.      // HTTP error...
  6.      $response $exc->response;
  7.  catch (Services_GeoNames_Exception $exc{
  8.      // API error handling ...
  9.  }



[ Top ]


Class Variables

$response =

[line 84]

HTTP_Request2_Response instance.
  • Access: public

Type:   HTTP_Request2_Response


[ Top ]



Method Detail

__construct (Constructor)   [line 98]

void __construct( string $msg, [int|Exception $p2 = null], [HTTP_Request2_Response $resp = null])

Constructor.
  • Access: public

Parameters:

string   $msg     The exception message
int|Exception   $p2     Exception code or cause
HTTP_Request2_Response   $resp     Optional request response

[ Top ]


Documentation generated on Fri, 01 Oct 2010 11:30:03 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.