Error
PHP Manual

Error::getCode

(No version information available, might only be in Git)

Error::getCodeGets the error code

Beschreibung

final public mixed Error::getCode ( void )

Returns the error code.

Parameter-Liste

Diese Funktion hat keine Parameter.

Rückgabewerte

Returns the error code as integer

Beispiele

Beispiel #1 Error::getCode() example

<?php
try {
    throw new 
Error("Some error message"30);
} catch(
Error $e) {
    echo 
"The Error code is: " $e->getCode();
}
?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

The Error code is: 30

Siehe auch


Error
PHP Manual