You are here

private static function cf_error::p_load_backtrace in Common Functionality 7.2

Loads the backtrace log.

This removes parts of the backtrace that where errors from this class were called from. Therefore, the backtrace log stops where the error actually happens and not where this function is called.

Parameters

cf_error_code $error: The error code class object associated with the error.

29 calls to cf_error::p_load_backtrace()
cf_error::empty_array in modules/cf_error/classes/cf_error.php
Reports that a given argument is supposed to be non-empty array but is not.
cf_error::empty_string in modules/cf_error/classes/cf_error.php
Reports that a given argument is supposed to be non-empty string but is not.
cf_error::failed_to_backup in modules/cf_error/classes/cf_error.php
Reports that something was unable to backup.
cf_error::failed_to_delete in modules/cf_error/classes/cf_error.php
Reports that something was unable to delete.
cf_error::failed_to_export in modules/cf_error/classes/cf_error.php
Reports that something was unable to export.

... See full list

File

modules/cf_error/classes/cf_error.php, line 1202
Provides the derror exception class.

Class

cf_error

Code

private static function p_load_backtrace(cf_error_code &$error) {
  if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
    $backtrace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, self::p_backtrace_limit());
  }
  else {
    $backtrace = debug_backtrace();
  }

  // Remove the backtrace log for p_load_backtrace().
  array_shift($backtrace);

  // Remove the backtrace log of the error function.
  array_shift($backtrace);
  $error
    ->set_backtrace($backtrace);
  unset($backtrace);
}