<?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
Opis
final public string Exception::getMessage
( void
)
Returns the Exception message.
Parametry
Ta funkcja nie posiada parametrów.
Zwracane wartości
Returns the Exception message as a string.
Przykłady
Przykład #1 Exception::getMessage() example
<?php
try {
throw new Exception("Some error message");
} catch(Exception $e) {
echo $e->getMessage();
}
?>
Powyższy przykład wyświetli coś podobnego do:
Some error message
support resort ¶
4 years ago
