# Throwable

(PHP 7)

## Introducere

Throwable is the base interface for any object that can be thrown via a throw statement in PHP 7, including Error and Exception.

> Notă:

> PHP classes cannot implement the Throwable interface directly, and must instead extend Exception.

## Descrierea succintă a interfeței

Throwable {
/* Metode */
abstract public getMessage ( void ) : string
abstract public getCode ( void ) : int
abstract public getFile ( void ) : string
abstract public getLine ( void ) : int
abstract public getTrace ( void ) : array
abstract public getTraceAsString ( void ) : string
abstract public getPrevious ( void ) : Throwable
abstract public __toString ( void ) : string
}

## Cuprins

- Throwable::getMessage — Gets the message
- Throwable::getCode — Gets the exception code
- Throwable::getFile — Gets the file in which the exception was created
- Throwable::getLine — Gets the line on which the object was instantiated
- Throwable::getTrace — Gets the stack trace
- Throwable::getTraceAsString — Gets the stack trace as a string
- Throwable::getPrevious — Returns the previous Throwable
- Throwable::__toString — Gets a string representation of the thrown object