Exception

(PHP 5, PHP 7)

Einführung

Exception ist die Basisklasse für alle Exceptions in PHP 5, und die Basisklasse für alle Benutzer-Exceptions in PHP 7.

Vor PHP 7 implementierte Exception das Throwable-Interface nicht.

Klassenbeschreibung

Exception implements Throwable {
/* Eigenschaften */
protected string $message ;
protected int $code ;
protected string $file ;
protected int $line ;
/* Methoden */
public __construct ([ string $message = "" [, int $code = 0 [, Throwable $previous = NULL ]]] )
final public getMessage ( ) : string
final public getPrevious ( ) : Throwable
final public getCode ( ) : mixed
final public getFile ( ) : string
final public getLine ( ) : int
final public getTrace ( ) : array
final public getTraceAsString ( ) : string
public __toString ( ) : string
final private __clone ( ) : void
}

Eigenschaften

message

Die Exceptionmeldung.

code

Die Fehlernummer der Exception.

file

Der Name der Datei, in der die Exception erzeugt wurde.

line

Die Zeilennummer, in der die Exception erzeugt wurde.

Inhaltsverzeichnis