Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Exception.php

function PEAR_Exception::getTraceSafe

Build a backtrace and return it

Return value

array Backtrace

4 calls to PEAR_Exception::getTraceSafe()
PEAR_Exception::getCauseMessage in vendor/pear/pear_exception/PEAR/Exception.php
Function must be public to call on caused exceptions
PEAR_Exception::getErrorClass in vendor/pear/pear_exception/PEAR/Exception.php
Gets the first class of the backtrace
PEAR_Exception::getErrorMethod in vendor/pear/pear_exception/PEAR/Exception.php
Gets the first method of the backtrace
PEAR_Exception::toHtml in vendor/pear/pear_exception/PEAR/Exception.php
Generates a HTML representation of the exception

File

vendor/pear/pear_exception/PEAR/Exception.php, line 321

Class

PEAR_Exception
Base PEAR_Exception Class

Code

public function getTraceSafe() {
    if (!isset($this->_trace)) {
        $this->_trace = $this->getTrace();
        if (empty($this->_trace)) {
            $backtrace = debug_backtrace();
            $this->_trace = array(
                $backtrace[count($backtrace) - 1],
            );
        }
    }
    return $this->_trace;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal