Kraken\Throwable\Exception::toTrace PHP Method

toTrace() public static method

Return Exception full trace in array format.
public static toTrace ( Error | Exception $ex ) : mixed
$ex Error | Exception
return mixed
    public static function toTrace($ex)
    {
        return Throwable::getThrowableStack($ex);
    }

Usage Example

Exemplo n.º 1
0
 /**
  *
  */
 public function testStaticApiToTrace_ReturnsTrace()
 {
     $prev = $this->createException('Previous');
     $ex = $this->createException('Exception', $prev);
     $this->assertTrace(Exception::toTrace($ex));
 }