downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Exception::getPrevious> <Exception::__construct
[edit] Last updated: Fri, 25 May 2012

view this page in

Exception::getMessage

(PHP 5 >= 5.1.0)

Exception::getMessageGets the Exception message

Descrierea

final public string Exception::getMessage ( void )

Returns the Exception message.

Parametri

Această funcție nu are parametri.

Valorile întoarse

Returns the Exception message as a string.

Exemple

Example #1 Exception::getMessage() example

<?php
try {
    throw new 
Exception("Some error message");
} catch(
Exception $e) {
    echo 
$e->getMessage();
}
?>

Exemplul de mai sus va afișa ceva similar cu:

Some error message



add a note add a note User Contributed Notes Exception::getMessage
support resort 10-Mar-2009 05:40
<?php
$client
= new SoapClient ("http://example.com");
try {
   
$response = $client->Client_Function();
} catch(
SoapFault  $e) {
    echo
$e->getMessage();
}
?>

 
show source | credits | stats | sitemap | contact | advertising | mirror sites