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

Class: OpenTTDLibException

Source Location: /includes/OpenTTDLibException.php

Class Overview

Exception
   |
   --OpenTTDLibException

OpenTTDLibException is as of rev24 thrown by OpenTTDLib


Author(s):

Version:

  • $Id: OpenTTDLibException.php 273 2009-04-01 10:41:19Z dih $

Variables

Constants

Methods


Inherited Variables

Class: Exception (Internal Class)

$code
$file
$line
$message
$string
$trace

Inherited Methods

Class: Exception (Internal Class)

constructor __construct ( [$message = ], [$code = ] )
getCode ( )
getFile ( )
getLine ( )
getMessage ( )
getTrace ( )
getTraceAsString ( )
__clone ( )
__toString ( )

Class Details

[line 32]
OpenTTDLibException is as of rev24 thrown by OpenTTDLib



Tags:

author:  dihedral <dihedral@codecubes.org>
version:  $Id: OpenTTDLibException.php 273 2009-04-01 10:41:19Z dih $
since:  rev24
license:  GNU General Public License v2


[ Top ]


Class Variables

$_host =

[line 66]



Tags:

var:  host name or ip as passed to OpenTTDLib::queryServer()
access:  protected

Type:   string


[ Top ]

$_packet =

[line 61]



Tags:

var:  OpenTTDLibPacket if available at exception, otherwise null
access:  protected

Type:   mixed


[ Top ]

$_port =

[line 71]



Tags:

var:  port number as passed to OpenTTDLib::queryServer()
access:  protected

Type:   integer


[ Top ]



Class Methods


method dumpForDebug [line 164]

string dumpForDebug( )

returns all the instances data base64 encoded, making it easy find out what went wrong

when provided along with a bug report




Tags:

access:  public


[ Top ]

constructor __construct [line 83]

void __construct( string $host, integer $port, [integer $code = null], [string $message = ""], [OpenTTDLibPacket $packet = null])

cunstructor to OpenTTDLibException



Tags:

access:  public


Overrides Exception::constructor __construct ( [$message = ], [$code = ] ) (parent method not documented)

Parameters:

string   $host   hostname or ip as passed to OpenTTDLib::queryServer()
integer   $port   port number as passed to OpenTTDLib::queryServer()
integer   $code   error code, use one of the ERROR constants
string   $message   depending on $code, it's appended to the error message or dropped
OpenTTDLibPacket   $packet   copy of OpenTTDLibPacket if available when Exception is thrown

[ Top ]

method _prependCodeMessage [line 103]

void _prependCodeMessage( )

set the error message according to the error code



Tags:

access:  protected


[ Top ]

method __toString [line 153]

string __toString( )

logic of how the class in converted to a string



Tags:

return:  the most relevant data in the Exception
access:  public


Overrides Exception::__toString ( ) (parent method not documented)

[ Top ]


Class Constants

ERROR_CACHE_NOT_READABLE =  40

[line 49]

$var integer error value to pass to OpenTTDLibException::__construct()


[ Top ]

ERROR_CACHE_NOT_WRITEABLE =  41

[line 50]

$var integer error value to pass to OpenTTDLibException::__construct()


[ Top ]

ERROR_CONNECT_FAILD =  20

[line 44]

$var integer error value to pass to OpenTTDLibException::__construct()


[ Top ]

ERROR_CONNECT_TIMEOUT =  21

[line 45]

$var integer error value to pass to OpenTTDLibException::__construct()


[ Top ]

ERROR_CUSTOM =  0

[line 37]

$var integer error value to pass to OpenTTDLibException::__construct()


[ Top ]

ERROR_GAME_INFO_VERSION =  30

[line 47]

$var integer error value to pass to OpenTTDLibException::__construct()


[ Top ]

ERROR_PACKET_INVALID =  13

[line 42]

$var integer error value to pass to OpenTTDLibException::__construct()


[ Top ]

ERROR_PACKET_SEND =  12

[line 41]

$var integer error value to pass to OpenTTDLibException::__construct()


[ Top ]

ERROR_PACKET_SIZE =  10

[line 39]

$var integer error value to pass to OpenTTDLibException::__construct()


[ Top ]

ERROR_PACKET_TYPE =  11

[line 40]

$var integer error value to pass to OpenTTDLibException::__construct()


[ Top ]



Documentation generated on Wed, 29 Apr 2009 23:33:50 +0200 by phpDocumentor 1.4.2