/**
* 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;
}