Back to CliRenderer class

Method getTrace

private string
getTrace
(\Throwable $error)
Returns a trace for the given error.
Parameters
  • \Throwable $error The error
Returns
  • string
Since
  • 4.0.0
Class: CliRenderer
Project: Joomla

Method getTrace - Source code

/**
 * Returns a trace for the given error.
 *
 * @param   \Throwable  $error  The error
 *
 * @return  string
 *
 * @since   4.0.0
 */
private function getTrace(\Throwable $error) : string
{
    // Include the stack trace only if in debug mode
    if (!JDEBUG) {
        return '';
    }
    return PHP_EOL . $error->getTraceAsString() . PHP_EOL;
}