getThrowableStack() public static method

Return throwable stack in recursive array format.
public static getThrowableStack ( Error | Exception $ex, &$data = [], integer $offset ) : mixed
$ex Error | Exception
$offset integer
return mixed
Beispiel #1
0
 /**
  *
  */
 public function testStaticApiGetThrowableStack_ReturnsStack_ForException()
 {
     $prev = $this->createException('Previous');
     $ex = $this->createException($message = 'Exception', $prev);
     $stack = Throwable::getThrowableStack($ex);
     $this->assertData($stack);
     $this->assertData($stack['prev']);
 }