IteratorAggregate::getIterator
Throwable::getMessage
Predefined Interfaces and Classes
PHP Manual

# Throwable

(PHP 7)

## Introduction

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

> Note:

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

## Interface synopsis

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

## Table of Contents

- Throwable::getMessage — Gets the message
- Throwable::getCode — Gets the exception code
- Throwable::getFile — Gets the file in which the exception occurred
- 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

IteratorAggregate::getIterator
Throwable::getMessage
Predefined Interfaces and Classes
PHP Manual