Class yii\debug\FlattenException
| Inheritance | yii\debug\FlattenException |
|---|---|
| Available since version | 2.0.10 |
| Source Code | https://github.com/yiisoft/yii2-debug/blob/master/FlattenException.php |
FlattenException wraps a PHP Exception to be able to serialize it.
Implements the Throwable interface Basically, this class removes all objects from the trace. Ported from Symfony components @link https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Debug/Exception/FlattenException.php
Protected Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| $code | mixed|integer | yii\debug\FlattenException | |
| $file | string | yii\debug\FlattenException | |
| $line | integer | yii\debug\FlattenException | |
| $message | string | yii\debug\FlattenException |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | FlattenException constructor. | yii\debug\FlattenException |
| __toString() | String representation of the exception | yii\debug\FlattenException |
| getClass() | yii\debug\FlattenException | |
| getCode() | Gets the Exception code | yii\debug\FlattenException |
| getFile() | Gets the file in which the exception occurred | yii\debug\FlattenException |
| getLine() | Gets the line in which the exception occurred | yii\debug\FlattenException |
| getMessage() | Gets the Exception message | yii\debug\FlattenException |
| getPrevious() | Returns previous Exception | yii\debug\FlattenException |
| getTrace() | Gets the stack trace | yii\debug\FlattenException |
| getTraceAsString() | Gets the stack trace as a string | yii\debug\FlattenException |
Protected Methods
Property Details
Method Details
FlattenException constructor.
| public void __construct ( Exception $exception ) | ||
| $exception | Exception | |
String representation of the exception
| public string __toString ( ) | ||
| return | string | The string representation of the exception. |
|---|---|---|
| public string getClass ( ) | ||
| return | string | The name of the class in which the exception was created. |
|---|---|---|
Gets the Exception code
| public mixed|integer getCode ( ) | ||
| return | mixed|integer | The exception code as integer. |
|---|---|---|
Gets the file in which the exception occurred
| public string getFile ( ) | ||
| return | string | The filename in which the exception was created. |
|---|---|---|
Gets the line in which the exception occurred
| public integer getLine ( ) | ||
| return | integer | The line number where the exception was created. |
|---|---|---|
Gets the Exception message
| public string getMessage ( ) | ||
| return | string | The Exception message as a string. |
|---|---|---|
Returns previous Exception
| public yii\debug\FlattenException getPrevious ( ) | ||
| return | yii\debug\FlattenException | The previous |
|---|---|---|
Gets the stack trace
| public array getTrace ( ) | ||
| return | array | The Exception stack trace as an array. |
|---|---|---|
Gets the stack trace as a string
| public string getTraceAsString ( ) | ||
| return | string | The Exception stack trace as a string. |
|---|---|---|
| protected void setClass ( $class ) | ||
| $class | string | The name of the class in which the exception was created. |
| protected void setCode ( $code ) | ||
| $code | mixed|integer | The exception code as integer. |
| protected void setFile ( $file ) | ||
| $file | string | The filename in which the exception was created. |
| protected void setLine ( $line ) | ||
| $line | integer | The line number where the exception was created. |
| protected void setMessage ( $message ) | ||
| $message | string | The Exception message as a string. |
| protected void setPrevious ( yii\debug\FlattenException $previous ) | ||
| $previous | yii\debug\FlattenException | Previous Exception. |
| protected void setToString ( $string ) | ||
| $string | string | The string representation of the thrown object. |
| protected void setTrace ( $trace ) | ||
| $trace | array | The Exception stack trace as an array. |