<?php
$client = new SoapClient ("http://example.com");
try {
$response = $client->Client_Function();
} catch(SoapFault $e) {
echo $e->getMessage();
}
?>
Exception::getMessage
(PHP 5 >= 5.1.0)
Exception::getMessage — Gets 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
support resort ¶
4 years ago
