Kraken\Throwable\Exception::toString PHP Method

toString() public static method

Return Exception full trace in string format.
public static toString ( Error | Exception $ex ) : string
$ex Error | Exception
return string
    public static function toString($ex)
    {
        return implode("\n", ["\t" . 'Throwable trace:', static::toThrowableString($ex), "\t" . 'Stack trace:', static::toStackString($ex)]);
    }

Usage Example

Example #1
0
 /**
  *
  */
 public function testStaticApiToString_ReturnsExceptionStack()
 {
     $prev = $this->createException('Previous');
     $ex = $this->createException('Exception', $prev);
     $this->assertSame((string) $ex, Exception::toString($ex));
 }
All Usage Examples Of Kraken\Throwable\Exception::toString